Linux commands-system startup and Shutdown

Source: Internet
Author: User

name: Halt
permission: System Administrator
usage: halt [-N] [-W] [-D] [-F] [-I] [-p]
Note: If the runlevel of the system is 0 or 6, otherwise, the system is shut down. The
parameter:
-N: do not write the memory data back to the hard disk before shutdown
-W: it does not actually shut down, but only writes the records to the/var/log/wtmp file
-D: do not write the record to the/var/log/wtmp file (the-n parameter contains-d)-f: Force Shutdown without calling the shutdown command
-I: stop all network-related devices before shutdown
-P: When shutdown, do the power off operation by the way
example:
turn off the power after halt-P shuts down the system.
halt-D shut down the system, but no record is left.

Name: init
Permission: at startup
Usage: init [0123456ss]
Note: init is the parent route of all processes. It will start from this command when it is started (you can use PS-Aux to check whether the first itinerary is INIT ), and refer to the/etc/inittab file to complete the entire boot.ProgramThere are a total of eight runlevels, and the change can only be changed through the telinit command.
Parameters:
0 indicates that the startup execution level is 0, which is used to disable the system.
1. the startup execution level is 1, which is used for single user mode)
4. the startup execution level is 4, indicating the mode when the window is X.
6 boot execution level: 6, used to reboot
S or S is not used directly. It is used when Level 1 is executed at startup, when S or S is added, the file "/etc/inittab" is not referenced. For details, refer to the file "/etc/inittab" and "/etc/rc. d/rc2.d,/etc/rc. d/rc3.d,/etc/rc. d/rc5.d directory
Example:
Because this does not allow users to execute commands separately, please refer to/etc/inittab

Name: reboot
Permission: System Administrator
Usage: reboot [-N] [-W] [-D] [-F] [-I]
Note: If the runlevel of the system is 0 or 6, restart the system. Otherwise, replace the shutdown command with the-R parameter.
Parameters:
-N: Do not write the memory data back to the hard disk before restarting.
-W: The record is not written to the/var/log/wtmp file.
-D: Do not write the record to the/var/log/wtmp file (-N contains-d)-f: Force reboot, do not call the shutdown command
-I: Stop all network-related devices before restarting.
Example:
Reboot restarts.
Reboot-W is used as a reboot simulation (only record does not actually reboot ).

Name: Shutdown
Permission: System Administrator
Usage: shutdown [-T seconds] [-rkhncff] time [Message]

Note: shutdown can be used to shut down the program and send a message to all users before shutdown. Shutdown can also be used to restart the system.
Parameters:
-T seconds: Set to shut down the program in seconds.
-K: it does not actually shut down, but only sends the warning message to all users.
-R: reboot after Shutdown
-H: Shut down after Shutdown
-N
-C: cancels the shutdown action that is currently in progress.
-F: do not perform fcsk operations when shutting down (check the Linux File System)
-F: Forces The fsck action when the instance is shut down.
Time: Set the shutdown time
Message: warning message sent to all users
 

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.