Linux Basics-Shutdown Restart command shutdown, reboot, etc.

Source: Internet
Author: User

first, the role of shutdown restart command

  Believe that for people who have access to the computer, especially for Windows systems, if the long-time use without a restart, there will be a little bit of the feeling of lag. But when the whole system is restarted, it feels like it's gone again, and the Windows system resets the entire service after rebooting, just like resetting the factory settings, and maybe restarting is the way it works. Also in Linux, shutdown Restart is also necessary, Linux server, often encounter server restart shutdown, may need to maintain the system, the new system on-line and so on. So for example, shutdown, reboot, halt commands are useful, this is to learn Linux must learn the command.

second, the common shutdown restart command

  (1)shutdown option time: Performs an action at a specified number of times and requires a login password if it is a non-root user. Where option is optional as follows:

-H: Shutdown

-R: Restart

-C: Cancel the previous shutdown command

(2) Other shutdown commands:

Halt: Shutdown, only the root user can use.

Poweroff: Shutdown, non-root users need to enter the login password.

Init 0: Shutdown, non-root users need to enter a login password.

(3) Other restart commands:

Reboot: Reboot, non-root user needs to enter login password.

Init 6: Restart, non-root users need to enter a login password.

Three, the effect demonstration

  (1) Use the Shutdown command to perform a shutdown operation immediately, the Linux command is shown below, 3-1, which shows that Linux is shutting down.

1 shutdown-h now

  

  

                  Figure 3-1

  (2) Use the shutdown command to immediately perform a restart shutdown operation, the Linux command is shown below, 3-2, which shows that Linux is rebooting.

1 shutdown-r now

  

                          Figure 3-2

Finally, the commands for other shutdown restarts are not demonstrated. So many commands to shut down how to choose, I personally recommend the shutdown command. Because the Shutdow command can specify a time to perform an action, and the command is more secure, it saves information about the service in progress and then performs an action.

Linux Basics-Shutdown Restart command shutdown, reboot, etc.

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.