The use of the terminal becomes handy when you are using any Linux-based/Unix-based operating system. You can use the terminal with commands to perform any task. You can shut down, suspend, or restart your system using the terminal. 

In this article, we will learn some commands to shut down, suspend(sleep) and restart the Ubuntu 22.04 system.

How to boot, shut down, and suspend your system from the terminal?

Sometimes, when you are configuring or troubleshooting your system, you have to restart the system to update your settings. In this case, you can use the GUI to do these tasks or you can use the terminal to do these tasks. This guide will help you to shut down, suspend, and reboot your system from the terminal. 

To accomplish these activities, you have to boot your system first. 

How to Boot the System?

The process of loading the operating system to the memory is called booting. During this process, all the hardware and software components of the system are checked. If all the components are working correctly, the operating system starts its services. You can boot the system by pressing the power on button. If you are using the virtual environment, then select the system you want to start and click on the Start option from the navigation bar as shown in the diagram:

The system will start to boot up. 

How to Shut Down the System?

The process of turning off the services of the system is called shutdown. You can use the different commands to shut down the system. Use the following command to shutdown the system immediately:

$ sudo shutdown -h now

The command will turn off the system after the execution:

You can also set the time if you want to shut down the system after some time. Use the following command to turn off the system after a while: 

$ sudo shutdown -h +5

The command will turn your system off after 5 minutes:

If you have executed the command “sudo shutdown -h +5”, but you don’t want to shut down the system then you can cancel the shutdown process by using the following command:

$ shutdown -c

Now your system will not be turned off:

This is how you can shut down your system using the terminal. 

How to Suspend(sleep) the System?

It happens many times when you don’t want to shut down the system. You can suspend (sleep) the system. If you want to suspend the system, use the following command:

$ sudo systemctl suspend

The command will suspend the system services:

You can resume the system by logging in again.

How to Reboot the System?

During the installation of updates, sometimes it is recommended to reboot the system. You can use the GUI to reboot, or you can use the following command to restart the system:

$ sudo reboot

The command will reboot the system:

After a while, the system will boot and start the services again.

I hope that this article will help beginners to use some commands related to the system.

Conclusion

To boot, shut down, and suspend your system from the terminal in Ubuntu 22.04, use the instructions mentioned in the articlecle. You can use the “sudo shutdown -h now” command to shutdown, and type the “sudo suspend” command to suspend the system. In this article, we have learned how you can boot, shutdown and suspend your system from the terminal in Ubuntu 22.04.