Linux System Configuration: Difference between revisions
Jump to navigation
Jump to search
m Added Package Manager configuration |
m Added Debian information |
||
Line 10: | Line 10: | ||
...</nowiki>}} | ...</nowiki>}} | ||
|} | |} | ||
| | | colspan=2 | | ||
{| style="margin-left:auto;margin-right:auto;text-align:left;" | {| style="margin-left:auto;margin-right:auto;text-align:left;" | ||
| {{hc|/etc/systemd/logind.conf|2= | | {{hc|/etc/systemd/logind.conf|2= | ||
Line 20: | Line 20: | ||
| Time Zone | | Time Zone | ||
| <code>ln -s /etc/zoneinfo/<Country>/<City> /etc/localtime</code> | | <code>ln -s /etc/zoneinfo/<Country>/<City> /etc/localtime</code> | ||
| <code>ln -s /usr/share/zoneinfo/<Country>/<City> /etc/localtime</code> | | colspan=2 | <code>ln -s /usr/share/zoneinfo/<Country>/<City> /etc/localtime</code> | ||
|- | |- | ||
| Locale Availability | | Locale Availability | ||
| <code>apk add musl-locales</code> | | <code>apk add musl-locales</code> | ||
| <code>${EDITOR} /etc/locale.gen;</code><br /><code>locale-gen</code> | | colspan=2 | <code>${EDITOR} /etc/locale.gen;</code><br /><code>locale-gen</code> | ||
|- | |- | ||
| Locale Selection | | Locale Selection | ||
Line 45: | Line 45: | ||
LC_IDENTIFICATION=en_US.UTF-8</nowiki>}} | LC_IDENTIFICATION=en_US.UTF-8</nowiki>}} | ||
|} | |} | ||
| | | colspan=2 | | ||
{| style="margin-left:auto;margin-right:auto;text-align:left;" | {| style="margin-left:auto;margin-right:auto;text-align:left;" | ||
| {{hc|/etc/locale.conf|2= | | {{hc|/etc/locale.conf|2= | ||
Line 72: | Line 72: | ||
FONT=Lat2-Terminus16</nowiki>}} | FONT=Lat2-Terminus16</nowiki>}} | ||
|} | |} | ||
| <code>dpkg-reconfigure keyboard-configuration</code><br /><code>setupcon</code> | |||
|- | |- | ||
| Console Font | | Console Font | ||
| <code>${EDITOR} /etc/conf.d/consolefont;</code><br /><code>rc-update add consolefont boot</code> | | <code>${EDITOR} /etc/conf.d/consolefont;</code><br /><code>rc-update add consolefont boot</code> | ||
| <code>dpkg-reconfigure console-setup</code> | |||
|- | |- | ||
| Hostname | | Hostname | ||
| colspan= | | colspan=3 |<code>echo "hostname" > /etc/hostname</code> | ||
|- | |- | ||
| Hosts | | Hosts | ||
| colspan= | | colspan=3 | | ||
{| style="margin-left:auto;margin-right:auto;text-align:left;" | {| style="margin-left:auto;margin-right:auto;text-align:left;" | ||
| {{hc|/etc/hosts|2= | | {{hc|/etc/hosts|2= | ||
Line 115: | Line 117: | ||
|- | |- | ||
| User Creation | | User Creation | ||
| colspan= | | colspan=3 | <code>useradd -m -u <nnnn> -g users -G wheel,games,video,audio,optical,storage,scanner,power <username></code> | ||
|- | |- | ||
| Passwords | | Passwords | ||
| colspan= | | colspan=3 | <code>passwd <username></code> | ||
|- | |- | ||
| Package Manager | | Package Manager | ||
Line 175: | Line 177: | ||
pacman-key --recv-key 3056513887B78AEB | pacman-key --recv-key 3056513887B78AEB | ||
pacman-key --lsign-key 3056513887B78AEB}} | pacman-key --lsign-key 3056513887B78AEB}} | ||
|} | |||
|} | |||
| | |||
{| style="margin-left:auto;margin-right:auto;" | |||
| For Debian: | |||
{| style="text-align:left;" | |||
| {{hc|/etc/apt/sources.list|2= | |||
<nowiki>deb http://deb.debian.org/debian <release> main contrib nonfree | |||
deb http://deb.debian.org/debian <release>-updates main contrib nonfree | |||
deb http://deb.debian.org/debian <release>-security main contrib nonfree | |||
deb http://deb.debian.org/debian <release>-backports main contrib nonfree | |||
deb-src http://deb.debian.org/debian <release> main contrib nonfree | |||
deb-src http://deb.debian.org/debian <release>-updates main contrib nonfree | |||
deb-src http://deb.debian.org/debian <release>-security main contrib nonfree | |||
deb-src http://deb.debian.org/debian <release>-backports main contrib nonfree</nowiki>}} | |||
|} | |} | ||
|} | |} | ||
{| style="margin-left:auto;margin-right:auto;" | |||
| For Ubuntu: | |||
{| style="text-align:left;" | |||
| {{hc|/etc/apt/sources.list|2= | |||
<nowiki>deb http://archive.ubuntu.com/ubuntu/ <release> main restricted universe multiverse | |||
deb http://archive.ubuntu.com/ubuntu/ <release>-updates main restricted universe multiverse | |||
deb http://archive.ubuntu.com/ubuntu/ <release>-security main restricted universe multiverse | |||
deb http://archive.ubuntu.com/ubuntu/ <release>-backports main restricted universe multiverse | |||
deb http://archive.canonical.com/ubuntu <release> partner | |||
deb-src http://archive.ubuntu.com/ubuntu/ <release> main restricted universe multiverse | |||
deb-src http://archive.ubuntu.com/ubuntu/ <release>-updates main restricted universe multiverse | |||
deb-src http://archive.ubuntu.com/ubuntu/ <release>-security main restricted universe multiverse | |||
deb-src http://archive.ubuntu.com/ubuntu/ <release>-backports main restricted universe multiverse | |||
deb-src http://archive.canonical.com/ubuntu <release> partner</nowiki>}} | |||
|} | |||
|} | |||
To enable multilib on Debian-based distros:<br /> | |||
<code>dpkg --add-architecture i386</code> | |||
|- | |- | ||
| NanoRC | | NanoRC | ||
Line 222: | Line 258: | ||
|- | |- | ||
| sudo | | sudo | ||
| colspan= | | colspan=3 | | ||
{| style="margin-left:auto;margin-right:auto;text-align:left;" | {| style="margin-left:auto;margin-right:auto;text-align:left;" | ||
| | | | ||
Line 235: | Line 271: | ||
{| style="margin-left:auto;margin-right:auto;text-align:left;" | {| style="margin-left:auto;margin-right:auto;text-align:left;" | ||
| {{hc|/etc/polkit-1/rules.d/49-rootpw_global.rules|2= | | {{hc|/etc/polkit-1/rules.d/49-rootpw_global.rules|2= | ||
<nowiki>// 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"]; | |||
});</nowiki>}} | |||
|} | |||
| | |||
{| style="margin-left:auto;margin-right:auto;text-align:left;" | |||
| {{hc|/etc/polkit-1/localauthority.conf.d/49-rootpw_global.rules|2= | |||
<nowiki>// Always authenticate Admins by prompting for the root password | <nowiki>// Always authenticate Admins by prompting for the root password | ||
// similar to the rootpw option in sudo | // similar to the rootpw option in sudo | ||
Line 244: | Line 290: | ||
|- | |- | ||
| Sticky bit directories | | Sticky bit directories | ||
| colspan= | | colspan=3 | | ||
{| style="margin-left:auto;margin-right:auto;text-align:left;" | {| style="margin-left:auto;margin-right:auto;text-align:left;" | ||
| {{hc|/etc/sysctl.d/stickybit.conf|2= | | {{hc|/etc/sysctl.d/stickybit.conf|2= | ||
Line 332: | Line 378: | ||
|- | |- | ||
| SMARTd | | SMARTd | ||
| colspan= | | colspan=3 | | ||
{| style="margin-left:auto;margin-right:auto;text-align:left;" | {| style="margin-left:auto;margin-right:auto;text-align:left;" | ||
| {{hc|/etc/smartd.conf|2= | | {{hc|/etc/smartd.conf|2= | ||
Line 342: | Line 388: | ||
| Limit Logs | | Limit Logs | ||
| | | | ||
| | | colspan=2 | | ||
{| style="margin-left:auto;margin-right:auto;text-align:left;" | {| style="margin-left:auto;margin-right:auto;text-align:left;" | ||
| {{hc|/etc/systemd/journald.conf|2= | | {{hc|/etc/systemd/journald.conf|2= | ||
Line 352: | Line 398: | ||
| Reduced service timeout | | Reduced service timeout | ||
| | | | ||
| | | colspan=2 | | ||
{| style="margin-left:auto;margin-right:auto;text-align:left;" | {| style="margin-left:auto;margin-right:auto;text-align:left;" | ||
| {{hc|/etc/systemd/system.conf|2= | | {{hc|/etc/systemd/system.conf|2= | ||
Line 363: | Line 409: | ||
| systemd-resolved<br />local host name resolution | | systemd-resolved<br />local host name resolution | ||
| | | | ||
| | | colspan=2 | | ||
{| style="margin-left:auto;margin-right:auto;text-align:left;" | {| style="margin-left:auto;margin-right:auto;text-align:left;" | ||
| {{hc|/etc/nsswitch.conf|2= | | {{hc|/etc/nsswitch.conf|2= | ||
Line 379: | Line 425: | ||
| systemd-resolved<br />with avahi | | systemd-resolved<br />with avahi | ||
| | | | ||
| | | colspan=2 | | ||
{| style="margin-left:auto;margin-right:auto;text-align:left;" | {| style="margin-left:auto;margin-right:auto;text-align:left;" | ||
| {{hc|/etc/systemd/resolved.conf|2= | | {{hc|/etc/systemd/resolved.conf|2= | ||
Line 388: | Line 434: | ||
|- | |- | ||
| Default Editor | | Default Editor | ||
| colspan= | | colspan=3 | | ||
{| style="margin-left:auto;margin-right:auto;text-align:left;" | {| style="margin-left:auto;margin-right:auto;text-align:left;" | ||
| {{hc|/etc/profile.d/editor.sh|2= | | {{hc|/etc/profile.d/editor.sh|2= | ||
Line 395: | Line 441: | ||
|- | |- | ||
| Video Acceleration | | Video Acceleration | ||
| colspan= | | colspan=3 | | ||
{| style="margin-left:auto;margin-right:auto;text-align:left;" | {| style="margin-left:auto;margin-right:auto;text-align:left;" | ||
| {{hc|/etc/profile.d/video-accel.sh|2= | | {{hc|/etc/profile.d/video-accel.sh|2= |
Revision as of 22:36, 10 March 2022
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
|
|
dpkg-reconfigure keyboard-configuration setupcon
| ||||||
Console Font | ${EDITOR} /etc/conf.d/consolefont; rc-update add consolefont boot
|
dpkg-reconfigure console-setup
| |||||||
Hostname | echo "hostname" > /etc/hostname
| ||||||||
Hosts |
| ||||||||
Initramfs | ${EDITOR} /etc/mkinitfs.conf; mkinitfs
|
| |||||||
User Creation | useradd -m -u <nnnn> -g users -G wheel,games,video,audio,optical,storage,scanner,power <username>
| ||||||||
Passwords | passwd <username>
| ||||||||
Package Manager |
|
To enable multilib on Debian-based distros: | |||||||
NanoRC |
| ||||||||
sudo |
| ||||||||
PolicyKit rootpw |
|
| |||||||
Sticky bit directories |
| ||||||||
NTP Client ([Open]NTP) |
| ||||||||
NTP Client (systemd-timesyncd) |
| ||||||||
NTP Server |
| ||||||||
Plymouth |
| ||||||||
SMARTd |
| ||||||||
Limit Logs |
| ||||||||
Reduced service timeout |
| ||||||||
systemd-resolved local host name resolution |
| ||||||||
systemd-resolved with avahi |
| ||||||||
Default Editor |
| ||||||||
Video Acceleration |
|