Linux shutdown command (change property)
The shutdown command in Linux is used to shut down or restart the system at certain times. During this procedure, it disables the login system to prevent new users from entering the system and sends personalized messages on the terminals to all connected users notifying that the system will be shut down.
The most common options are:
- -r Restart (reboot) the system after the shutdown sequence has finished;
- -h Halt the system after the shutdown sequence has ended. It does not restart the machine;
- -k It sends the shutdown message but does not start the shutdown sequence;
- -f It loads the system quickly without checking disks;
- -F Forces a disk check when restarting the system.
To restart the system immediately:
To restart the system at 06:00 in the morning and send a message to the users’ terminal:
The difference between changing the runlevel to 0 or 6 and the shutdown command is that the shutdown command is administratively better, since it alerts users that there will be a shutdown in the system. On the other hand, when changing init, there is no warning.
Control-Alt-Del
The “ca” line in the /etc/inittab file discusses what happens when we press the sequence control+alt+del:
And before taking any action to maintain or restart the system, especially when it comes to a multi-user server, it is elegant for the administrator to use the wall utility to send messages to logged-in users
Learn much more about Linux in our online course. You can register here. If you already have an account, or want to create one, just log in or create your user here.
Did you like it?
Share