Skip to content

Click on each book below to review & buy on Amazon.

As an Amazon Associate, I earn from qualifying purchases.


RHCSA - Operate Running Systems: Boot, Reboot & Shut Down a System Normally

Ensure that for production systems you always communicate with any stakeholders before rebooting or shutting down a system.

Rebooting

Rebooting a Linux server is important because it:

  • Allows software updates and security patches to take effect.
  • Clears system resources, improving performance and responsiveness.
  • Enables the installation of updated kernel versions for new features and fixes.
  • Can be used to test configuration changes survive a reboot, which is a MUST for the RHCSA exam.

The command for rebooting the server is systemctl reboot, however the reboot command on its own is linked to systemctl which means you can save on typing and use the reboot command on its own.

The shutdown -r command can also be used to reboot a system. With this command you can also enable messages to be written to the screen and to schedule when an action takes place. Any scheduled reboots can be cancelled using shutdown -c.

Reboot the server giving users a 2 minute warning:

sudo shutdown -r +2 "The server is rebooting in 2 minutes to complete system updates"

If you would like to be able to see the message get printed, you will need to have logged in by another console or another SSH session. Opening the another terminal within the GUI will not show the message.

Cancel the reboot with shutdown -c unless you wish to see the reboot take place.

Shutting Down

Shutting down a Linux server is important for various reasons, such as:

  • Saving power and resources when the server is not in use.
  • Reducing costs associated with a running system.
  • Prolong the life of the system by switching off out of hours.

The command for shutting down the server is systemctl poweroff or systemctl shutdown. however the poweroff & shutdown commands on there own are linked to systemctl which means you can save on typing and use those commands instead.

The shutdown command on its own will schedule the shutdown in one minute. If you want to shutdown immediately you use either shutdown now or poweroff.

Shutdown the server giving users a 2 minute warning:

sudo shutdown +2 "The server is shutting down in 2 minutes to rest for the night"

If you would like to be able to see the message get printed, you will need to have logged in by another console or another SSH session. Opening the another terminal within the GUI will not show the message.

Cancel the shutdown with shutdown -c unless you wish to see the shutdown take place.


Support DTV Linux

Click on each book below to review & buy on Amazon. As an Amazon Associate, I earn from qualifying purchases.

NordVPN ®: Elevate your online privacy and security. Grab our Special Offer to safeguard your data on public Wi-Fi and secure your devices. I may earn a commission on purchases made through this link.