Shutdown is a command for shutdown. in Linux, parameters must be included. for example, shutdown-hnow is a command for immediate shutdown. However, when running such commands on a terminal, Linux does not shut down sometimes, after reading a lot of information, I finally saw that it was not just a root user problem...
Shutdown is a command for shutdown. in Linux, parameters must be included. for example, shutdown-h now is a command for immediate shutdown. However, when running such a command on a terminal, Linux does not shut down sometimes, after reading a lot of information, I finally saw that it was not just a problem with the root user. I had to switch the user to the root user and use su-root to enter the password, run shutdown-h now again, and the desired result is displayed. Linux is shut down.
-
Shutdown is a command for shutdown. in Linux, parameters must be included. for example, shutdown-h now is a command for immediate shutdown. However, when running such a command on a terminal, Linux does not shut down sometimes, after reading a lot of information, I finally saw that it was not just a problem with the root user. I had to switch the user to the root user and use su-root to enter the password, run shutdown-h now again, and the desired result is displayed. Linux is shut down.
The Linux shutdown command is invalid, and the prompt "command not found" is returned.
This is because normal users do not have the permission to shut down and must call the administrator user. Even though you are currently using a root user, you still cannot use the shutdown command.
So, you must use the su command in the shell to call up the root user and then execute the command.
The code is as follows:
Su-root
Password
Shutdown-h now
Code description:
The first line,-there is a space between the front and back.
The second line is the system root user password. If you are currently using a non-root user, you need to enter it. if you are currently using a root user, you do not need to enter the following command.
The third line is to refer to the relevant explanatory documents for the code followed by shutdown.
Shutdown
Shut down the computer, send a signal to the root process init, and change runlevel to 0 (halt)
-H power off
-R restart
-N forced shutdown without sending signals to the init process
-K simulates shutdown and sends a shutdown warning to the supervisor
-T <秒> Shutdown after N seconds eg:-t 60 // shutdown after 60 seconds
Time <时间> Timed shutdown
-C [instructions] cancel shutdown
-F ignore detection file system upon restart
-F force detection of the file system upon restart