Language Selection

English French German Italian Portuguese Spanish

Should 'halt' call 'shutdown'?

Filed under
Linux

As mentioned briefly in the comments section of Bootstrapping your Linux Machine, recent Linux systems have added a convenience feature to the 'halt' and 'reboot' commands: they actually call 'shutdown' if the system isn't in init state 0 or 6.

You can override this behaviour with "-f" or use 'poweroff', but I'm not entirely sure that this was a good idea to start with.
The purpose of 'shutdown' is to bring the system down cleanly. It should kill off user processes gently (starting with SIGTERM so that processes that trap that can clean up open files, etc.) and it should then have 'init' change run levels so that appropriate scripts can run to do other cleanup.

This is all to the good. It's the way a system should be brought down under normal circumstances, so having 'halt' and 'reboot' invoke 'shutdown' is certainly helpful for the naive user who doesn't understand what should be done to bring down a system. But should traditional commands be perverted to prevent naive users from damaging systems?

Full Article.

More in Tux Machines

Linux Devices

Tanglu 4 "Dasyatis Kuhlii" Enters Beta, Ships with Linux Kernel 4.6 & GNOME 3.20

Matthias Klumpp informs the community about the availability of the first Beta build towards the Tanglu 4 "Dasyatis Kuhlii" GNU/Linux operating system, due for release later this year. Tanglu 4 "Dasyatis Kuhlii" Beta is distributed with the usual flavors, including with the KDE and GNOME desktop environments. A Core edition is available as well, designed for those who want to build their own Tanglu-based GNU/Linux distribution. Under the hood, all Tanglu 4 Beta editions are powered by a kernel from the Linux 4.6 series, along with the systemd 229 init system, but each one incorporates some of the latest open-source technologies that correspond to their user base. Read more

Parabola GNU/Linux New install medium 2016.07.27

Dual architecture (i686 and x86_64): Main ISO - Live ISO image for installation and recovery. MATE desktop ISO - Live ISO image for installation and recovery (with MATE Desktop Environment). TalkingParabola ISO - Live ISO image for installation and recovery (adapted for blind and visually impaired users) Read more

Linux Graphics