The last time I was running linux on my desktop was back in 2011 or so. That time having things like:
- ntpd, crond
- runlevels and all the init.d scripts
- conf.d scripts
... was a normal and straightforward thing to use. Just google for "systemV" or "System5"
But things had changed since then. In favor for fewer seconds less of the wait time for a system boot up (which was probably one and only downside of having things starting sequentially), Linux distros have moved to systemd with its cumbersome configs with units, targets, timers and all that stuff.
And yeah, ntpd is also gone, it's now chrony.service.
"Fuck, I hate changes" - I thought at first. But then, after a while, I realized the new scheme of things brings much more flexibility, if you use it in a right way.
So instead of runlevels we now have some.targets. Targets can include (aka require) other targets. Like for your graphical.target where you have X.Org started you might want to have network.target to be reached as well. It makes a lot of sense as it gives you more clear nesting of service groups
Here's the quick cheat sheet.
What is the default target Linux will try to boot into | systemctl get-default |
Change default target | systemctl set-default <target_name> |
List all units (services, targets, timers) including disabled | systemctl list-unit-files |
What is current target(s) | with systemd it can be more than one: systemctl list-units --type target --state active |
Change current target | systemctl isolate <target_name> |
Show dependency tree of what default target requires / specific target requires | systemctl list-dependencies [<target_name>] |
See status and other details about specific unit (service, target, ...) | systemctl status <unit> |
See the whole system journal logs in "tail" mode | journalctl -f |
See specific unit journal logs in "tail" mode | journalctl -f -u sshd.service |
No comments:
Post a Comment