4 ms·
For shutdown, I use "sudo systemctl poweroff". I thought the other syntaxes were still working only for legacy support.
by reacweb 9y ago
For shutdown, I use "sudo systemctl poweroff". I thought the other syntaxes were still working only for legacy support.
- vesinisa 9y agoThis guide is severely outdated - I can't see any indication of systemd recognition in any of the Linux examples.
- Fnoord 9y agoYup. I mean as filesystems for Linux it listed Ext2, Ext3, and ReiserFS. A webpage like this is excellent to be managed via a wiki.
- peterwwillis 9y agoRunlevels still kinda-sorta exist in systemd. Old way: # Change default runlevel sed -i -e 's/^id:.*/id:4:initdefault:/' /etc/inittab # Shut down telinit 0 New way: # Change default runlevel ln -sf /usr/lib/systemd/system/multi-user.target /etc/systemd/system/default.target # Shut down systemctl list-unit-files systemctl isolate runlevel0.target
- JdeBP 9y agoThe systemd people themselves state them to be "obsolete". * https://freedesktop.org/software/systemd/man/runlevel.html https://freedesktop.org/software/systemd/man/runlevel.html * https://freedesktop.org/software/systemd/man/telinit.html https://freedesktop.org/software/systemd/man/telinit.html These things do not actually exist in systemd at all, outwith a few compatibility shims. And the same can be said of FreeBSD, too. They don't actually exist in FreeBSD, or indeed any BSD, at all, outwith compatibility shims such as FreeBSD's init command. (The FreeBSD init compatibility shim really is not recognizing the command-line arguments as runlevels in any real sense, especially since it does not recognize the numbers 2, 3, 4, and 5; the very numbers for which the run part of runlevel is appropriate.) Note that the systemd compatibility shim completely ignores the actual "runlevel0.target" targets; that there is no "init table" of runlevel stuff; and that the separate run levels in /etc/rc[234].d are all combined into one by systemd's backwards compatibility service unit generator. This stuff genuinely does not exist in systemd. * https://unix.stackexchange.com/a/196014/5132 https://unix.stackexchange.com/a/196014/5132 * https://unix.stackexchange.com/a/233581/5132 https://unix.stackexchange.com/a/233581/5132 * http://jdebp.eu./FGA/inittab-is-history.html http://jdebp.eu./FGA/inittab-is-history.html Arch Linux users don't even get the compatibility shims. * https://unix.stackexchange.com/questions/389289/ https://unix.stackexchange.com/questions/389289/
- phaemon 9y agoIt is fairly outdated. It says it was last updated in December 2014, but I'm not sure it's had much added. (this is on Ubuntu, but anything with systemd should be similar) You're correct about systemctl. If you do: ls -lh /sbin | grep systemctl you can see that `poweroff` and other commands are symlinks to `/sbin/systemctl`. The systemctl code shows it checks the name it's called with and chooses an action based on that: https://github.com/systemd/systemd/blob/aaa6732d7834c1dc0f937936563218724d71b619/src/systemctl/systemctl.c#L8149 https://github.com/systemd/systemd/blob/aaa6732d7834c1dc0f93...