News for hackers. Stuff that matters.
Re:Rosetta Stone for Unix (2014) by reacweb on Wednesday September 06, 2017 @03:50AM (#15181897)
For shutdown, I use "sudo systemctl poweroff". I thought the other syntaxes were still working only for legacy support.
Re:Rosetta Stone for Unix (2014) by phaemon on Wednesday September 06, 2017 @10:42AM (#15184051)
It 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/aaa6732d7834c1dc0f93...

Re:Rosetta Stone for Unix (2014) by vesinisa on Wednesday September 06, 2017 @04:11AM (#15181966)
This guide is severely outdated - I can't see any indication of systemd recognition in any of the Linux examples.
Re:Rosetta Stone for Unix (2014) by Fnoord on Wednesday September 06, 2017 @10:31AM (#15183962)
Yup. I mean as filesystems for Linux it listed Ext2, Ext3, and ReiserFS. A webpage like this is excellent to be managed via a wiki.
Re:Rosetta Stone for Unix (2014) by peterwwillis on Wednesday September 06, 2017 @09:52AM (#15183631)
Runlevels 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
Re:Rosetta Stone for Unix (2014) by JdeBP on Wednesday September 06, 2017 @11:01AM (#15184207)
The systemd people themselves state them to be "obsolete".

* https://freedesktop.org/software/systemd/man/runlevel.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/233581/5132

* http://jdebp.eu./FGA/inittab-is-history.html

Arch Linux users don't even get the compatibility shims.

* https://unix.stackexchange.com/questions/389289/