Usage of shutdown command in Kali Linux 3-1

In Kali Linux, the shutdown command is used to stop (halt), shut down (power off) or restart (reboot) the system.

1 Grammar format

The syntax of the shutdown command is as follows

shutdown [OPTIONS] [TIME] [WALL]

Among them, OPTIONS represents the parameter; TIME represents the specified time; WALL represents the displayed information.

2 Introduction to OPTIONS

2.1 Stop the system

The -H or --halt parameter means to stop (halt) the system.

Figure 1 Stopping the system

It should be noted that using the -H parameter requires administrator privileges, so add "sudo" before the shutdown command, and you need to enter the administrator's password after pressing Enter. After pressing Enter again, it will display that the system will stop, as shown in Figure 1.

2.2 Shut down the system

The -P or --poweroff parameter indicates to turn off (power off) the system, as shown in Figure 2.

Figure 2 Shut down the system

Using the -P parameter does not require administrator privileges. After entering the command and pressing Enter, the message that the system will shut down in one minute will be displayed, as shown in Figure 2.

Related Links 1 The difference between halt and poweroff, halt turns off the system but does not turn off the power; while poweroff turns off the system and turns off the power at the same time. When running Kali Linux in a VMware virtual machine, after halting the system, Kali Linux will stop in the interface shown in Figure 3.

Figure 3 halt system

At this time, you need to click "Close Client" in the toolbar of the VMware virtual machine to shut down the system, as shown in Figure 4.

Figure 4 Shut down the client

After the poweroff system, Kali Linux will shut down directly without manual shutdown again.

2.3 Restart the system

The -r or --reboot parameter indicates to restart the system. Using the command shown in Figure 5, the system can be restarted.

Figure 5 reboot system

Guess you like

Origin blog.csdn.net/hou09tian/article/details/128529236