From The Brainwrecked Wiki
Jump to navigation
Jump to search
|
|
Line 93: |
Line 93: |
| | Initramfs | | | Initramfs |
| | <code>${EDITOR} /etc/mkinitfs.conf; mkinitfs</code> | | | <code>${EDITOR} /etc/mkinitfs.conf; mkinitfs</code> |
| | <code>${EDITOR} /etc/mkinitcpio.conf; mkinitcpio -P</code> | | | |
| | {| style="margin-left:auto;margin-right:auto;text-align:left;" |
| | | {{hc|/etc/mkinitcpio.conf|2= |
| | <nowiki>... |
| | # Open-source drivers |
| | MODULES+=(amdgpu i915 nouveau radeon) |
| | # Proprietary NVIDIA |
| | MODULES+=(nvidia nvidia_drm nvidia_modeset nvidia_uvm) |
| | # QEMU virtual machines |
| | MODULES+=(bochs_drm cirrus qxl virtio-gpu) |
| | ... |
| | HOOKS=(base udev autodetect) |
| | HOOKS+=(modconf block filesystems keyboard fsck) |
| | HOOKS+=(keymap consolefont) |
| | ... |
| | # Only for filesystems already compressed with zstd |
| | COMPRESSION="cat" |
| | ...</nowiki>}} |
| | <code>mkinitcpio -P</code> |
| | |} |
| |- | | |- |
| | PAM rootpw | | | PAM rootpw |
Revision as of 17:33, 12 May 2021
Description |
Alpine |
Arch |
Debian |
Void
|
Laptop Lid Switch Fix
|
/etc/elogind/logind.conf
...
HandleLidSwitch=ignore
...
|
|
/etc/systemd/logind.conf
...
HandleLidSwitch=ignore
...
|
|
Time Zone
|
ln -s /etc/zoneinfo/<Country>/<City> /etc/localtime
|
ln -s /usr/share/zoneinfo/<Country>/<City> /etc/localtime
|
Locale Availability
|
apk add musl-locales
|
${EDITOR} /etc/locale.gen;
locale-gen
|
Locale Selection
|
/etc/profile.d/locale.sh
LANG=en_US.UTF-8
LANGUAGE=en_US
LC_COLLATE=POSIX
LC_MESSAGES=C
LC_CTYPE=en_US.UTF-8
LC_NUMERIC=en_US.UTF-8
LC_TIME=en_US.UTF-8
LC_MONETARY=en_US.UTF-8
LC_PAPER=en_US.UTF-8
LC_NAME=en_US.UTF-8
LC_ADDRESS=en_US.UTF-8
LC_TELEPHONE=en_US.UTF-8
LC_MEASUREMENT=en_US.UTF-8
LC_IDENTIFICATION=en_US.UTF-8
|
|
/etc/locale.conf
LANG=en_US.UTF-8
LANGUAGE=en_US
LC_COLLATE=POSIX
LC_MESSAGES=C
LC_CTYPE=en_US.UTF-8
LC_NUMERIC=en_US.UTF-8
LC_TIME=en_US.UTF-8
LC_MONETARY=en_US.UTF-8
LC_PAPER=en_US.UTF-8
LC_NAME=en_US.UTF-8
LC_ADDRESS=en_US.UTF-8
LC_TELEPHONE=en_US.UTF-8
LC_MEASUREMENT=en_US.UTF-8
LC_IDENTIFICATION=en_US.UTF-8
|
|
Keymap
|
setup-keymap
|
/etc/vconsole
KEYMAP=us
FONT=Lat2Terminus16
|
|
Console Font
|
${EDITOR} /etc/conf.d/consolefont;
rc-update add consolefont boot
|
Hostname
|
${EDITOR} /etc/hostname
|
Hosts
|
/etc/hosts
# Static table lookup for hostnames.
# See hosts(5) for details.
127.0.0.1 localhost.local.lan localhost
::1 localhost.local.lan localhost
127.0.1.1 hostname.local.lan hostname
|
|
Initramfs
|
${EDITOR} /etc/mkinitfs.conf; mkinitfs
|
/etc/mkinitcpio.conf
...
# Open-source drivers
MODULES+=(amdgpu i915 nouveau radeon)
# Proprietary NVIDIA
MODULES+=(nvidia nvidia_drm nvidia_modeset nvidia_uvm)
# QEMU virtual machines
MODULES+=(bochs_drm cirrus qxl virtio-gpu)
...
HOOKS=(base udev autodetect)
HOOKS+=(modconf block filesystems keyboard fsck)
HOOKS+=(keymap consolefont)
...
# Only for filesystems already compressed with zstd
COMPRESSION="cat"
...
mkinitcpio -P
|
|
PAM rootpw
|
/etc/polkit-1/rules.d/49-rootpw_global.rules
// Always authenticate Admins by prompting for the root password
// similar to the rootpw option in sudo
polkit.addAdminRule(function(action, subject) {
return ["unix-user:root"];
});
|
|
Sticky bit directories
|
/etc/sysctl/stickbit.conf
# Allow the creation regular files in world-writable sticky directories
# when the file owner doesn't match that of the directory
fs.protected_regular=0
|
|
NTP Client ([Open]NTP)
|
/etc/ntpd.conf
server [server1]
server [server2]
server [server3]
restrict default kod limited nomodify nopeer noquery notrap
restrict 127.0.0.1
restrict ::1
driftfile /var/lib/ntp/ntp.drift
|
|
NTP Client (systemd-timesyncd)
|
|
/etc/systemd/timesyncd.conf
...
[Time]
NTP=[your-local-server]
FallbackNTP=[closest-remote-server]
...
timedatectl set-ntp true
|
|
NTP Server
|
/etc/ntpd.conf
server [server1]
server [server2]
server [server3]
server 127.127.1.0
fudge 127.127.1.0 stratum 10
restrict default kod nomodify notrap noquery
restrict 192.168.10.0 mask 255.255.255.0 kod nomodify notrap
restrict 127.0.0.1
restrict ::1
driftfile /var/lib/ntp/ntp.drift
|
|
SMARTd
|
/etc/smartd.conf
...
DEVICESCAN -n standby,15,q -s (S/../.././02)
...
|
|
Limit Logs
|
|
/etc/systemd/journald.conf
...
SystemMaxUse=64M
...
|
|
Reduced service timeout
|
|
/etc/systemd/system.conf
...
DefaultTimeoutStartSec=30s
DefaultTimeoutStopSec=15s
...
|
|
systemd-resolved local host name resolution
|
|
/etc/nsswitch.conf
...
hosts: files mymachines myhostname resolve dns
...
|
/etc/systemd/resolved.conf
...
Domains=your.local.domain
...
|
|
systemd-resolved with avahi
|
|
/etc/systemd/resolved.conf
...
MulticastDNS=no
...
|
|