As an Ubuntu user, if you are searching for the commands to shut down and restart the system, follow this article’s guidelines.
Shutdown and Restart Ubuntu Using Linux Command Line
There are multiple commands to shutdown and restart (reboot) the Ubuntu system, and we will discuss them in parts:
1: Shutdown Ubuntu Using Command Line
For Ubuntu users, there are multiple commands to shutdown the system, which are discussed below:
The first command to shutdown the Ubuntu system is straightforward that users have to execute using the “sudo”:
The above command will immediately shutdown the Ubuntu system.
The second command is the halt command that immediately stop/cease all CPU operations and shut down the system:
If a user wants to shutdown the system after some minutes, he/she have to use the following command:
For example, here I have scheduled a shutdown after 1 minute:
The Ubuntu users can also add a specific time for system shutdown using the following command:
For instance, here I have scheduled a shutdown at 11:00 am:
To cancel the scheduled shutdown or reboot at any time, run the shutdown command with -c for cancel:
2: Restart the Ubuntu Using Command Line
The Ubuntu users can restart the Ubuntu system through any of the command discussed below:
If you want to immediately restart the Ubuntu system then run the below-mentioned “reboot” command:
It may ask for the user password, as soon as you will enter the password, the system will reboot:
You can also use the simple reboot command which is mentioned below that will restart the system:
You can also use the “shutdown” command with “-r” flag to inform the system to restart after a shutdown:
You can also specify a time for the above give “shutdown” command with “-r” flag to restart the system.
For example, here I have scheduled a system reboot at 10:44 pm. Just remember to follow the 24-hour format:
Another Linux command to restart the system is the systemctl reboot command that can be used to restart the system:
The Ubuntu users can easily shutdown the system from the command-line using different shutdown commands. These commands immediately shut down the system or perform shutdown after a specific time. Further, the users can also use the reboot commands or shutdown commands with “-r” flag to restart the system immediately or after some time.