2

Today in class, the teacher asked us to say different ways to shutdown/reboot,etc. the system. I said "poweroff" and I though that it was probably actually a symbolic link to "shutdown" or "halt".

We are using Ubuntu 12.04 and when I checked it turned out to be a link to "reboot" which kind of surprised me. How does that make sense?

In my Raspberry Pi running Debian I get: /sbin/poweroff: symbolic link to 'halt'

EDIT: I don't see how my question is answered there.It mentions that when forcing shutdown poweroff invokes the reboot syscall, but doesn't answer why it is linked to reboot(1)

user2859982
  • 121
  • 3
  • 1
    `reboot`, `poweroff` and `halt` are all the same command. I suspect it's just the developer's whim that `reboot` is the main binary. In particular, this set of links is from Upstart, the case where the links point to `halt` is from `sysvinit`. I'd guess if you install Upstart in Debian you'd see the same behaviour there as well. – muru Mar 23 '15 at 19:16
  • This question has an excellent answer on Unix.SE: https://unix.stackexchange.com/questions/77029/why-are-reboot-shutdown-and-poweroff-symlinks-to-systemctl – David Foerster Mar 24 '15 at 09:03
  • Yeah, I already knew how those symlinks worked, I just wondered why `reboot` was the main binary.I guess @muru answered it. – user2859982 Mar 24 '15 at 10:02

0 Answers0