Home  >  Article  >  System Tutorial  >  How to change root password in CentOS operating system

How to change root password in CentOS operating system

WBOY
WBOYforward
2024-01-08 13:21:54937browse

For operation and maintenance, it is inevitable that you will encounter the situation of forgetting Linux. So how to retrieve or reset the root password of the Linux system after forgetting it? This article takes CentOS as an example:

1. Press any key quickly when turning on the phone, because the default time is 5s

How to change root password in CentOS operating system

2. The grub menu has only one kernel and nothing to choose from. Press the e key. However, if you upgrade the system or install Xen virtualization, there will be multiple displays.

How to change root password in CentOS operating system

3. The following is displayed. Select the second item and press the e key

How to change root password in CentOS operating system

How to change root password in CentOS operating system

4. The next display is as follows. Add "space" at the end of rhgb quiet, then type "1" or "s" or "S" or "single". Press the Enter key to return to the previous level

How to change root password in CentOS operating system How to change root password in CentOS operating system

5. Press b key to start the system

How to change root password in CentOS operating system

6. The last interface

Input 1:

How to change root password in CentOS operating system

Enter letters:

How to change root password in CentOS operating system

7. Enter passwd directly to change the root password

How to change root password in CentOS operating system

The above is the detailed content of How to change root password in CentOS operating system. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:linuxprobe.com. If there is any infringement, please contact admin@php.cn delete