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

Kodi (XBMC Media Center) 14.2 Officially Released, Kodi 15 “Isengard” Is On Its Way

The Kodi development team, through Nathan Betzen, had the pleasure of announcing today, March 28, the immediate availability for download of the second and last maintenance release for Kodi 14 (codename Helix), before they continue with the development cycle for the upcoming release, Kodi 15, dubbed Isengard. Read more

Debian 8 Jessie Installer Now Supports Running a 64-bit Linux Kernel on a 32-bit EFI

The Debian Installer team had the pleasure of announcing on March 27 that the second Release Candidate (RC) version of the Debian 8.0 "Jessie" installer is now available for download and testing. The RC2 version of the installer brings a great number of improvements and fixes. Read more

First Look at GNOME 3.16

The highly anticipated GNOME 3.16 desktop environment for Linux kernel-based operating systems has been announced on March 26, 2015, and has been declared by the GNOME development team as the best GNOME release yet. Of course, we wanted to give GNOME 3.16 desktop environment a try and see for ourselves the new features, apps, and improvements. Read more

today's howtos