Check out my first novel, midnight's simulacra!
Systemd: Difference between revisions
(Created page with "I try not to be judgmental, but if someone's complaining about "the good ol' SysVinit days", they're pretty much an idiot. systemd has its flaws, but it's infinitely better th...") |
|||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
I try not to be judgmental, but if someone's complaining about "the good ol' SysVinit days", they're pretty much an idiot. systemd has its flaws, but it's infinitely better than what came before, not an insult ala Upstart, and actually got things moving, so I'm a big fan. | I try not to be judgmental, but if someone's complaining about "the good ol' SysVinit days", they're pretty much an idiot. systemd has its flaws, but it's infinitely better than what came before, not an insult ala Upstart, and actually got things moving, so I'm a big fan. | ||
Remember, changes to systemd files are only reflected following <tt>systemctl daemon-reload</tt>! | |||
==Recipes== | |||
* Reboot to system configuration (i.e. [[UEFI]] config): <tt>systemctl reboot --firmware-setup</tt> | |||
* List all targets: <tt>systemctl list-unit-files --type=target</tt> | |||
* Get default boot target: <tt>systemctl get-default</tt> | |||
==System instance== | |||
===Paths=== | ===Paths=== | ||
In descending priority: | |||
* /etc/systemd/system: results of <tt>systemctl enable</tt> and system unit extensions | |||
* /run/systemd/system: runtime, systemd-originated units | |||
* /usr/lib/systemd/system: package-originated system units | |||
==User instances== | |||
When enabled, <tt>pam_systemd</tt> launches a single <tt>systemd --user</tt> instance for a user's first login, which is killed when that user's last login exits. It is possible for user instances to be started at boot, and preserved following logout; use <tt>loginctl enable-linger username</tt>. | |||
User units can neither depend on nor reference system units. | |||
===Paths=== | |||
In descending priority: | |||
* ~/.config/systemd/user: user-originated units for that's user sessions | * ~/.config/systemd/user: user-originated units for that's user sessions | ||
* /etc/systemd/user: system-wide admin-originated units for user sessions | * /etc/systemd/user: system-wide admin-originated units for user sessions | ||
* ~/.local/share/systemd/user/: package-originated, user-installed units for that user's sessions | * ~/.local/share/systemd/user/: package-originated, user-installed units for that user's sessions | ||
* /usr/lib/systemd/user: package-originated, admin-installed units for user sessions | * /usr/lib/systemd/user: package-originated, admin-installed units for user sessions | ||
==systemd-networkd== | |||
* <tt>netdev</tt>, <tt>network</tt>, and <tt>link</tt> files. | |||
* Ownership: <tt>root:systemd-networkd</tt> 0640 | |||
===External Links=== | |||
* [https://blog.darknedgy.net/technology/2020/05/02/0/index.html systemd: ten years later] | |||
* Archwiki's [https://wiki.archlinux.org/title/Systemd/User Systemd/User] page |
Latest revision as of 19:59, 6 March 2024
I try not to be judgmental, but if someone's complaining about "the good ol' SysVinit days", they're pretty much an idiot. systemd has its flaws, but it's infinitely better than what came before, not an insult ala Upstart, and actually got things moving, so I'm a big fan.
Remember, changes to systemd files are only reflected following systemctl daemon-reload!
Recipes
- Reboot to system configuration (i.e. UEFI config): systemctl reboot --firmware-setup
- List all targets: systemctl list-unit-files --type=target
- Get default boot target: systemctl get-default
System instance
Paths
In descending priority:
- /etc/systemd/system: results of systemctl enable and system unit extensions
- /run/systemd/system: runtime, systemd-originated units
- /usr/lib/systemd/system: package-originated system units
User instances
When enabled, pam_systemd launches a single systemd --user instance for a user's first login, which is killed when that user's last login exits. It is possible for user instances to be started at boot, and preserved following logout; use loginctl enable-linger username.
User units can neither depend on nor reference system units.
Paths
In descending priority:
- ~/.config/systemd/user: user-originated units for that's user sessions
- /etc/systemd/user: system-wide admin-originated units for user sessions
- ~/.local/share/systemd/user/: package-originated, user-installed units for that user's sessions
- /usr/lib/systemd/user: package-originated, admin-installed units for user sessions
systemd-networkd
- netdev, network, and link files.
- Ownership: root:systemd-networkd 0640
External Links
- systemd: ten years later
- Archwiki's Systemd/User page