How to log on to a Linux operating system using a single user

Source: Internet
Author: User

The Linux operating system has many problems when many users use it. Next we will look at how to better use the Linux operating system. In single-user mode, you must enter the password of the root user. Otherwise, you cannot log on to single-user mode.

If you lose the password of the root user, you cannot reset the root password in single-user mode; in addition, the single-user mode also requires that your grub or lilo can work normally, and you know where your system problems occur. When you log on in single-user mode, you can open the write operation of the file system, and then perform the system repair you want.

Some may say, "I really don't know which system is wrong, it does not explain how to fix the system;

1. Use the grub System Boot manager for single-user logon;

After grub is started, move the keyboard to the startup Item of the Linux operating system, press the e key, and then move the keyboard to a line similar to the following, that is, the line of the kernel:

 
 
  1. kernel /boot/vmlinuz-2.6.11-1.1369_FC4 ro root=LABEL=/1 
    rhgb quiet 

Move the cursor to this line and press the e key to edit the line. At the end of the line, enter a space and linux single, which is similar to the following:

 
 
  1. kernel /boot/vmlinuz-2.6.11-1.1369_FC4 ro root=LABEL=/1 
    rhgb quiet linux single 

End editing and press enter to return. Then we will start the system and press B to start it;

After running in single-user mode, the system prompts us to enter the root password. after entering the correct password, the system will enter. You can use df-h to view the Mount location of the file system, you can also use fdisk-l to view partitions and so on. But write operations on the file system may need to be viewed below. After a single user enters the system, the system may be read-only; run the following command;

 
 
  1. #mount -o remount,rw / 

2. lilo Boot manager single-user mode;

In boot: Enter

 
 
  1. linux single 

After running in single-user mode, the system prompts us to enter the root password. after entering the correct password, the system will enter. You can use df-h to view the Mount location of the file system, you can also use fdisk-l to view partitions and so on. But write operations on the file system may need to be viewed below. After a single user enters the system, the system may be read-only; run the following command;

 
 
  1. #mount -o remount,rw / 

Linux operating system rescue Repair Mode

In Linux, the repair mode is linux rescue. In the repair mode, the system password is not required. When the repair mode is enabled, the system will prompt the file system on the partition to be mounted, we can choose based on our own system conditions. After you log on to the system, the system will prompt the directory to which the file system of the partition will be mounted. If you do not know where the file system is mounted, check it through df-h;

The repair mode requires the first or independent Repair Disk of the disk to be installed. For example, Fedora has a dedicated Repair Disk. In fact, the Repair Disk is similar to livecd in a sense and can run the system without being installed on the hard disk; then mount the file system. In fact, when we execute linux rescue, there will be some prompts for systems such as Fedora, such as the partitions that he wants to mount, let's just select it;

The following steps are required to perform the repair mode;

1. In BIOS, set the first boot drive to CDROM;

2. Find the first installation disk of the system, and put it into the CDROM. When the disc is running, the installation interface is displayed;

In boot: Enter linux rescue and press Enter;

 
 
  1. boot:linux rescue 

What can we do when the Linux operating system enters the repair mode ?? Everything can be done, such as mounting USB disks for data backup; modifying the configuration file in the system ...... reset the root password and mount the file system ...... as long as you can think of it, most of it can be done.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.