Shutdown in linux

Source: Internet
Author: User
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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.