Systemd: Difference between revisions
From DWIKI
mNo edit summary |
mNo edit summary |
||
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
| |||
= Documentation = | = Documentation = | ||
Line 6: | Line 7: | ||
*[http://www.freedesktop.org/wiki/Software/systemd/ http://www.freedesktop.org/wiki/Software/systemd/] | *[http://www.freedesktop.org/wiki/Software/systemd/ http://www.freedesktop.org/wiki/Software/systemd/] | ||
*[https://wiki.ubuntu.com/systemd https://wiki.ubuntu.com/systemd] | *[https://wiki.ubuntu.com/systemd https://wiki.ubuntu.com/systemd] | ||
*[https://wiki.archlinux.org/index.php/Systemd Creating systemd service] | *[https://wiki.archlinux.org/index.php/Systemd Creating systemd service] | ||
*[https://wiki.ubuntu.com/SystemdForUpstartUsers https://wiki.ubuntu.com/SystemdForUpstartUsers] | *[https://wiki.ubuntu.com/SystemdForUpstartUsers https://wiki.ubuntu.com/SystemdForUpstartUsers] | ||
*[https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-systemd-services-and-units How To Use Systemctl to Manage Systemd Services and Units] | *[https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-systemd-services-and-units How To Use Systemctl to Manage Systemd Services and Units] | ||
Line 13: | Line 14: | ||
*[https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/ Predictable Network Interface Names] | *[https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/ Predictable Network Interface Names] | ||
*[[https://blog.darknedgy.net/technology/2020/05/02/0/index.html#tech-critique https://blog.darknedgy.net/technology/2020/05/02/0/index.html#tech-critique] | *[[https://blog.darknedgy.net/technology/2020/05/02/0/index.html#tech-critique https://blog.darknedgy.net/technology/2020/05/02/0/index.html#tech-critique] | ||
*[https://mohsensy.github.io/sysadmin/2018/08/19/systemd-service-tutorial.html Systemd service tutorial] | |||
([https://www.thegeekdiary.com/how-to-boot-into-rescue-mode-or-emergency-mode-through-systemd-in-centos-rhel-7-and-8/ Single user/emergency] | ([https://www.thegeekdiary.com/how-to-boot-into-rescue-mode-or-emergency-mode-through-systemd-in-centos-rhel-7-and-8/ Single user/emergency] | ||
=Locations= | = Locations = | ||
/etc/systemd | /etc/systemd | ||
/usr/lib/systemd/ | /usr/lib/systemd/ | ||
/lib/systemd | /lib/systemd | ||
| |||
= HOWTO = | |||
== Timers == | |||
*[https://opensource.com/article/20/7/systemd-timers https://opensource.com/article/20/7/systemd-timers] | |||
*[https://wiki.archlinux.org/title/Systemd/Timers https://wiki.archlinux.org/title/Systemd/Timers] | |||
man systemd.timer | |||
=== List active timers === | |||
systemctl list-timers | |||
=== List all timers === | |||
systemctl list-timers --all | |||
=== Create timer === | |||
systemctl enable fstrim.timer | |||
= FAQ = | = FAQ = | ||
==Systemd and DNS== | == Analyze boot processes == | ||
systemd-analyze blame | |||
| |||
== Systemd and DNS == | |||
resolvectl status | resolvectl status | ||
Restart: | |||
systemctl restart systemd-resolved | |||
=== Add nameserver === | |||
Sacrifice a chicken | |||
=== Flush caches === | |||
systemd-resolve --flush-caches | |||
== All status == | == All status == |
Revision as of 12:47, 10 January 2022
Documentation
- Useful systemd commands
- http://www.freedesktop.org/wiki/Software/systemd/
- https://wiki.ubuntu.com/systemd
- Creating systemd service
- https://wiki.ubuntu.com/SystemdForUpstartUsers
- How To Use Systemctl to Manage Systemd Services and Units
- How to switch from NetworkManager to systemd-networkd on Linux
- https://fedoraproject.org/wiki/SysVinit_to_Systemd_Cheatsheet
- Predictable Network Interface Names
- [https://blog.darknedgy.net/technology/2020/05/02/0/index.html#tech-critique
- Systemd service tutorial
Locations
/etc/systemd /usr/lib/systemd/ /lib/systemd
HOWTO
Timers
man systemd.timer
List active timers
systemctl list-timers
List all timers
systemctl list-timers --all
Create timer
systemctl enable fstrim.timer
FAQ
Analyze boot processes
systemd-analyze blame
Systemd and DNS
resolvectl status
Restart:
systemctl restart systemd-resolved
Add nameserver
Sacrifice a chicken
Flush caches
systemd-resolve --flush-caches
All status
systemctl status -a
syslog spam
list available services
systemctl list-unit-files
or
systemctl list-units
normal interface names
net.ifnames=0
Show failed services
systemctl --failed
systemd: Started Session
Change loglevel to notice in /etc/systemd/system.conf
systemctl daemon-reexec