Which Commands Could You Run To Shut Down The Service?
Guidelines for Shutting Downwardly a System
Keep the following in mind when you lot shut down a organisation:
-
Utilize either the shutdown or the init command to close down a system. Both commands perform a clean organization shutdown, which means that all organisation processes and services are terminated normally.
-
You need to be the root role to apply the shutdown and init commands.
-
Both the shutdown and init commands accept a run level as an argument.
The three nigh common run levels are every bit follows:
-
Run level 3 – All system resources are available and users can log in. By default, booting a organisation brings it to run level 3, which is used for normal day-to-day operations. This run level is also known as the multiuser state with NFS resources shared.
-
Run level six – Shuts downwardly the system to run level 0, and then reboots the system to a multiuser level with SMB or NFS resources shared (or any run level is the default in the inittab file).
-
Run level 0 – The operating system is shut down, and it is safe to turn off power. You need to bring a system to run level 0 whenever you move a organization, or add or remove hardware.
Run levels are fully described in How Run Levels Work.
-
System Shutdown Commands
The shutdown and init commands are the primary commands that are used to shut down a organisation. Both commands perform a make clean shutdown of the arrangement. As such, all file system changes are written to deejay, and all arrangement services, processes, and the operating system are terminated usually.
Turning a organisation off and and then on is not a clean shutdown considering organization services are terminated abruptly. Even so, sometimes these actions are needed in emergency situations.
The following table describes the various shutdown commands and provides recommendations for using them.
Table three-2 Shutdown Commands
Command | Clarification | When to Use |
---|---|---|
shutdown | An executable that calls the initprogram to shut down the arrangement. The system is brought to run level S by default. | Use this command to shut downwardly servers that are operating at run level three. |
init | An executable that terminates all agile processes and synchronizes the disks before changing run levels. | This command provides a faster organisation shutdown. The command is preferred for shutting down stand-solitary systems when other users will not be affected. |
reboot | An executable that synchronizes the disks and passes boot instructions to the uadminsystem telephone call. In turn, this organization call stops the processor. | The initcommand is the preferred method. |
halt , poweroff | An executable that synchronizes the disks and stops the processor. | Not recommended considering it does not shut downward all processes or unmount any remaining file systems. Stopping the services, without doing a clean shutdown, should only be done in an emergency or if most of the services are already stopped. |
Which Commands Could You Run To Shut Down The Service?,
Source: https://docs.oracle.com/cd/E23824_01/html/821-2731/hboverview-40266.html
Posted by: garciamanneve.blogspot.com
0 Response to "Which Commands Could You Run To Shut Down The Service?"
Post a Comment