Home  >  Article  >  Operation and Maintenance  >  What should I do if centos cannot be shut down?

What should I do if centos cannot be shut down?

藏色散人
藏色散人Original
2022-01-27 14:41:583254browse

Solution to the problem that centos cannot be shut down: 1. Use the command "ps -aux" to check whether there is a background process running; 2. Shut down through the shutdown, halt or poweroff commands.

What should I do if centos cannot be shut down?

The operating environment of this article: centOS7 system, DELL G3 computer

What should I do if centos cannot be shut down?

CentOS 7 Correct shutdown and restart

Linux is mainly used in the server field, and executing a service on the server is never-ending unless it encounters Special circumstances, otherwise it will not shut down. Unlike Windows, under Linux systems, many processes are executed in the background. Behind the screen, there may be many people working at the same time. If you press the power button directly, other people's data may be interrupted. What's more serious is that if you shut down improperly, in serious cases, the file system may be damaged, resulting in data loss.

If you want to shut down, you must ensure that no other users in the current system are logging in to the system. We can use the who command to see if there are other people logged in, or use the command ps -aux to see if there are any background processes running. Shutdown, halt, and poweroff are all shutdown commands. We can use the command man shutdown to view its help documentation. For example, we run the following command to shut down.

What should I do if centos cannot be shut down?

Of course, if you learned it from CentOS 6.5, init 0 and init 6 are applicable to CentOS 7.

Init is divided into 7 levels. The meanings of these 7 levels are as follows.

What should I do if centos cannot be shut down?

The default startup runlevel is configured in /etc/inittab. The default value depends on the system release version: Debian and Ubuntu use runlevel 2, Red Hat and Fedora use runlevel 3 or 5, CentOS and Gentoo use runlevel 3

For each runlevel, there is a separate directory rc0.d ... rc6.d in the /etc directory, which contains many points to the /etc/init.d directory Symbolic link, so the service startup script is placed in the /etc/init.d directory.

Recommended: "centos usage tutorial"

The above is the detailed content of What should I do if centos cannot be shut down?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn