Home  >  Article  >  Operation and Maintenance  >  How to enter root in centos6.5

How to enter root in centos6.5

下次还敢
下次还敢Original
2024-04-07 20:00:22616browse

How to enter the CentOS 6.5 Root user: Use the sudo command to log in as an ordinary user, enter sudo su and provide the Root password. Restart the system into single-user mode, edit the kernel command line rw init=/sysroot/bin/sh in the GRUB menu, then mount the root file system and enter the Root password.

How to enter root in centos6.5

How to enter the Root user of CentOS 6.5

There are two ways to enter the Root user of CentOS 6.5:

Method 1: Use the sudo command

  • to log in to the system as a normal user.
  • Enter the following command: sudo su
  • You will be prompted to enter the password for the Root user. Enter your password and press Enter.
  • You are now switched to Root user.

Method 2: Use single-user mode

  • Restart the system.
  • During the boot process, when the GRUB menu appears, press the "e" key to edit the kernel command line.
  • In the linux16 line, find the "ro" option and change it to "rw init=/sysroot/bin/sh".
  • Press Ctrl x to start the system.
  • You will now enter single user mode.
  • Enter the following command: mount -o remount,rw /
  • The system will prompt you to enter the password of the Root user. Enter your password and press Enter.
  • You are now switched to Root user.

The above is the detailed content of How to enter root in centos6.5. 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