Linux System Configuration: Difference between revisions
Jump to navigation
Jump to search
m Added SMARTd configuration |
Switched Alpine and Arch, added new categories |
||
Line 1: | Line 1: | ||
{| class="wikitable" style="width: 100%; text-align: center;" | {| class="wikitable" style="width: 100%; text-align: center;" | ||
! Description !! | ! Description !! Alpine !! Arch !! Debian !! Void | ||
|- | |- | ||
| Laptop Lid Switch Fix | | Laptop Lid Switch Fix | ||
| | | | ||
{| style="margin-left:auto;margin-right:auto;text-align:left;" | |||
| {{hc|/etc/elogind/logind.conf|2= | |||
<nowiki>... | |||
HandleLidSwitch=ignore | |||
...</nowiki>}} | |||
|} | |||
| | |||
{| style="margin-left:auto;margin-right:auto;text-align:left;" | |||
| {{hc|/etc/systemd/logind.conf|2= | |||
<nowiki>... | |||
HandleLidSwitch=ignore | |||
...</nowiki>}} | |||
|} | |||
|- | |- | ||
| Time Zone | | Time Zone | ||
| <code>ln -s /etc/zoneinfo/<Country>/<City> /etc/localtime</code> | |||
| <code>ln -s /usr/share/zoneinfo/<Country>/<City> /etc/localtime</code> | | <code>ln -s /usr/share/zoneinfo/<Country>/<City> /etc/localtime</code> | ||
|- | |- | ||
| Locale Availability | | Locale Availability | ||
| <code>apk add musl-locales</code> | |||
| <code>${EDITOR} /etc/locale.gen;</code><br /><code>locale-gen</code> | | <code>${EDITOR} /etc/locale.gen;</code><br /><code>locale-gen</code> | ||
|- | |- | ||
| Locale Selection | | Locale Selection | ||
| | | | ||
| | {| style="margin-left:auto;margin-right:auto;text-align:left;" | ||
| {{hc|/etc/profile.d/locale.sh|2= | |||
<nowiki>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</nowiki>}} | |||
|} | |||
| | |||
{| style="margin-left:auto;margin-right:auto;text-align:left;" | |||
| {{hc|/etc/locale.conf|2= | |||
<nowiki>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</nowiki>}} | |||
|} | |||
|- | |- | ||
| Keymap | | Keymap | ||
| | | <code>setup-keymap</code> | ||
| | | rowspan=2 | | ||
{| style="margin-left:auto;margin-right:auto;text-align:left;" | |||
| {{hc|/etc/profile.d/locale.sh|2= | |||
<nowiki>KEYMAP=us | |||
FONT=Lat2Terminus16</nowiki>}} | |||
|} | |||
|- | |- | ||
| Console Font | | Console Font | ||
Line 26: | Line 77: | ||
|- | |- | ||
| Hostname | | Hostname | ||
| | | colspan=2 |<code>${EDITOR} /etc/hostname</code> | ||
| <code>${EDITOR} /etc/hostname</code> | |||
|- | |- | ||
| Hosts | | Hosts | ||
| | | colspan=2 | <code>${EDITOR} /etc/hosts</code> | ||
| <code>${EDITOR} /etc/hosts</code> | |||
|- | |- | ||
| Initramfs | | Initramfs | ||
| <code>${EDITOR} /etc/mkinitfs.conf; mkinitfs</code> | |||
| <code>${EDITOR} /etc/mkinitcpio.conf; mkinitcpio -P</code> | | <code>${EDITOR} /etc/mkinitcpio.conf; mkinitcpio -P</code> | ||
| < | |- | ||
| NTP Client<br >([Open]NTP) | |||
| colspan=2 | | |||
{| style="margin-left:auto;margin-right:auto;text-align:left;" | |||
| {{hc|/etc/ntpd.conf|2= | |||
<nowiki>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</nowiki>}} | |||
|} | |||
|- | |||
| NTP Client<br >(systemd-timesyncd) | |||
| | |||
| | |||
{| style="margin-left:auto;margin-right:auto;text-align:left;" | |||
| {{hc|/etc/systemd/timesyncd.conf|2= | |||
<nowiki>... | |||
[Time] | |||
NTP=[your-local-server] | |||
FallbackNTP=[closest-remote-server] | |||
...</nowiki>}} | |||
<code>timedatectl set-ntp true</code> | |||
|} | |||
|- | |||
| NTP Server | |||
| colspan=2 | | |||
{| style="margin-left:auto;margin-right:auto;text-align:left;" | |||
| {{hc|/etc/ntpd.conf|2= | |||
<nowiki>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</nowiki>}} | |||
|} | |||
|- | |- | ||
| SMARTd | | SMARTd | ||
| | | colspan=2 | | ||
{| style="margin-left:auto;margin-right:auto;text-align:left;" | |||
| {{hc|/etc/smartd.conf|2= | |||
<nowiki>... | |||
DEVICESCAN -n standby,15,q -s (S/../.././02) | |||
...</nowiki>}} | |||
|} | |||
|- | |- | ||
| Limit Logs | | Limit Logs | ||
| | | | ||
| | |||
{| style="margin-left:auto;margin-right:auto;text-align:left;" | |||
| {{hc|/etc/systemd/journald.conf|2= | |||
<nowiki>... | |||
SystemMaxUse=64M | |||
...</nowiki>}} | |||
|} | |||
|- | |||
| Reduced service timeout | |||
| | |||
| | |||
{| style="margin-left:auto;margin-right:auto;text-align:left;" | |||
| {{hc|/etc/systemd/system.conf|2= | |||
<nowiki>... | |||
DefaultTimeoutStartSec=30s | |||
DefaultTimeoutStopSec=15s | |||
...</nowiki>}} | |||
|} | |||
|- | |- | ||
| systemd-resolved<br />with avahi | | systemd-resolved<br />with avahi | ||
| | | | ||
| | |||
{| style="margin-left:auto;margin-right:auto;text-align:left;" | |||
| {{hc|/etc/systemd/resolved.conf|2= | |||
<nowiki>... | |||
MulticastDNS=no | |||
...</nowiki>}} | |||
|} | |||
|} | |} |
Revision as of 19:01, 11 May 2021
Description | Alpine | Arch | Debian | Void |
---|---|---|---|---|
Laptop Lid Switch Fix |
|
| ||
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 |
|
| ||
Keymap | setup-keymap
|
| ||
Console Font | ${EDITOR} /etc/conf.d/consolefont; rc-update add consolefont boot
| |||
Hostname | ${EDITOR} /etc/hostname
| |||
Hosts | ${EDITOR} /etc/hosts
| |||
Initramfs | ${EDITOR} /etc/mkinitfs.conf; mkinitfs
|
${EDITOR} /etc/mkinitcpio.conf; mkinitcpio -P
| ||
NTP Client ([Open]NTP) |
| |||
NTP Client (systemd-timesyncd) |
| |||
NTP Server |
| |||
SMARTd |
| |||
Limit Logs |
| |||
Reduced service timeout |
| |||
systemd-resolved with avahi |
|