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

How to enter root in centos6.5

下次还敢
Release: 2024-04-07 20:00:22
Original
745 people have browsed it

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!

Related labels:
source:php.cn
Statement of this Website
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
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template