Detailed graphic and text explanation of linux solution to su root switching prompt that there is no file or directory

黄舟
Release: 2017-07-24 14:58:07
Original
5360 people have browsed it

This article mainly introduces the solution for the common Linux user su root switching prompt that there is no file or directory. Friends who need it can refer to it

1. First enter single-user mode:

1). ubuntu:

In the above situation, you can choose the second fix in the grub interface, but if you don’t have grub, you can refer to:

1. Restart ubuntu, then press and hold shift to enter the grub menu;

2. Select recovery mode and press the "e" key to enter the editing page; as follows:

# Non-recovery mode is:

3. Replace ro recovery nomodeset with "rw single init=/bin/bash" (the above interface will be changed to rw single init=/bin/bash)

4. Press ctrl+x to enter single-user mode. The current user is root;
2) Fedora 23 (virtual machine)

After entering grub, press e to enter editing mode. Find the line starting with "linux" and append "rw single init=/bin/bash".  

 

   Press ctrl+x to start, and then enter the root shell environment.

 

2. Modify the user login shell.

vim? /etc/passwd The shell column is root or does not exist

Change to:root:x:0:0 :root:/root:/bin/bash.


Explanation: User name: Password: User identification number: Group identification number: Commentary description: Home directory: Login Shell

Two 0s The representative user is root and belongs to the root group, which means administrator rights

3. Then press ctrl+alt+delete to restart. problem solved.

The above is the detailed content of Detailed graphic and text explanation of linux solution to su root switching prompt that there is no file or directory. 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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template