Linux in the shutdown and restart

REVIEW

In the Linux operating system among,Some common features with the familiar Windows operating system is the same or similar operations,At the current terms of the Linux Desktop,It is quite routine office,but,If you still use Linux systems to run services,That you may have to deal with the text on the big screen,at this time,Even the most basic shutdown may become a big problem。

basis

[warning]In the Linux operating system among,Command can be used to shut down a good number of,Different distributions may not support all of these commands,But most still can be used。These commands include but are not limited to init、poweroff、reboot、halt、shutdown。[/warning]

1、What is sync

sync is a command under Linux,For simultaneous data。Where and synchronization? And memory。We all know that Linux is a multiuser operating system,So a lot of files in order to accelerate access,The latest version is stored into memory,If you ventured off to the host,The latest modified files may disappear or be destroyed,To prevent this from happening,sync command came into being,It will be called after you enter a command to shut down or reboot the system,but,for safety,Restart or shut down when the manual is also recommended to look。

2、Operating system run levels

init process ID is always 1,It is the ancestor of all processes,Like / Linux root file system is the same as,init process is Linux, the root,All other processes are all derived from init。Its main role is to produce a recording process according to the script / etc / inittab Lane (script) program。This file is typically used to control a user's login mode。Effective registration mode Linux system has a total of ten kinds of 0 to 9,However, restrictions in use UNIX systems up to 6 species,Generally only 1-6 effective。That is, we often talk about:Run Level。

OLYMPUS DIGITAL CAMERA

[warning] 6There are two modes is the system's default:0、Stopping the system;6、Reboot the system。[/warning]

Shutdown and restart

1、init command

As already mentioned init run levels,Practical init command can temporarily change run levels,Can reach 6 to 0 or shut down or reboot the system by switching the operating level formatting commands for the purpose of

2、shutdown命令

Very powerful,Here is a brief description,Then I will write an article dedicated to introduce this command。By using the following command allows Linux systems to achieve immediate shutdown or restart:

[warning]In fact, the shutdown command is to achieve by sending a shutdown and restart of changing the operating level to the init process[/warning]

3、reboot Command

To restart the system,You can also directly enter the reboot command,It does not require complex parameters,Press Enter to。In addition to enforcement mode,By default, it is achieved by calling shutdown restart。

4、halt command and the command poweroff

To shut down,You can use one of these halt and poweroff commands,They feature the same,They are in addition to enforcement mode,Enter the command to default。By invoking the shutdown command to shut down。

Original article written by Gerber drop-off:R0uter's Blog » Linux in the shutdown and restart

Reproduced Please keep the source and description link:https://www.logcg.com/archives/426.html

About the Author

R0uter

The non-declaration,I have written articles are original,Reproduced, please indicate the link on this page and my name。

Leave a Reply

Your email address will not be published. Required fields are marked *