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.

Frequently Asked Questions

How to boot Ubuntu 22.04 system from the terminal?

To boot the Ubuntu 22.04 system from the terminal, you can press the power button or select the system in a virtual environment and click on the Start option.

What is the process of shutting down a system using terminal commands?

The process of turning off the services of a system using terminal commands is called shutdown. You can use the command 'sudo shutdown -h now' to shut down the system immediately.

How can I suspend (sleep) my Ubuntu 22.04 system using the terminal?

To suspend or sleep your Ubuntu 22.04 system using the terminal, you can use the 'systemctl suspend' command. This command will put your system into a suspend state.

What is the importance of restarting the system during configuration or troubleshooting?

Restarting the system during configuration or troubleshooting is important to update settings and ensure that changes take effect. It helps in resolving various system issues and ensuring smooth operation.

Can I restart my system from the terminal for troubleshooting purposes?

Yes, you can restart your system from the terminal for troubleshooting purposes. You can use commands like 'sudo reboot' or 'sudo systemctl restart' to restart the system.

How to set a specific time for system shutdown using terminal commands?

To set a specific time for system shutdown using terminal commands, you can use the 'shutdown' command with the '-P' flag followed by the time in the format 'HH:MM'. For example, 'sudo shutdown -P 22:00' will schedule a shutdown at 10:00 PM.

What is the difference between shutting down and suspending a system?

Shutting down a system completely turns off all services and powers off the system, while suspending puts the system into a low-power state without completely shutting it down. Suspending allows for quicker resume and saves power compared to shutting down.

How does the booting process of a system ensure proper functioning of hardware and software components?

The booting process of a system involves checking all hardware and software components to ensure they are working correctly. This process helps in initializing the operating system services and ensuring a proper startup of the system.