VMware redhat command line and graphical interface switch Linux run level default interface configuration Modify error configuration __linux

Source: Internet
Author: User

Novice started to learn Linux, put some basic things summed up. The wrong place to look.

1, Linux graphics interface and command interface to switch

A Redhat Linux system is installed inside the virtual machine. The default entry is the graphical interface.

Switching from the Linux graphical interface to the command interface can be CTRL+ALT+FN (n=1,2,3,4,5,6), but ctrl+alt in the virtual machine is already occupied, that is, the cursor switching out of the virtual machine. So you need to press CTRL+SHIFT+ALT+FN (n=1,2,3,4,5,6).

Switching from the Linux command interface to the graphical interface allows you to press Alt+f7 (or enter the command startx into the graphical interface).

You can modify the configuration file if you want to boot the default into the command interface. The specific commands are as follows (under the command interface, of course, you must have root or a user with root privileges to modify it):

(1) Vi/etc/inittab--Edit/etc/inittab file with VI Editor

(2) Press I--switch to insert mode, i.e. Modify mode

(3) Find the Init:5:initdefault in the file, and change the 5 to 3--what's the following 5 and 3 respectively?

(4) Press Esc key--Exit Insert mode

(5) Press: (colon)--the cursor is locked to the last line

(6) Wq (Save and exit)

q! (do not save exit) If you do not want to change it

A reboot allows you to enter the command interface by default.


2. Linux Run Level

Linux has 7 run levels: init[0123456]

0: Off the machine

1: Single User

2: Multi-user status No NETWORK service

3: Multi-user status with network services

4: The system is not used reserved to the user

5: Graphical interface

6: Reboot

The common run level is 3 and 5, to modify the level of the run can be modified in the file/etc/inittab, method see 1 To modify the default entry interface.

If set to 1, it will be turned off and set to 6 will be restarted.


3, the solution to modify the wrong configuration method

If you are not careful to run the level set to 1 or 6 and can not go to the normal Linux, you may follow the following method to resolve. (Of course, when Grub doesn't have a password)

(1) Press "E" to enter the Grub boot interface when system boot is in a few seconds

(2) Highlight Select the second line, enter "E" enter

(3) Enter "1" [single User level], because the single user level does not read the/etc/inittab file at startup

(4) Return to the Grub interface

(5) Press "B" will enter the single mode

(6) in the single mode in accordance with the 1 inside the modified/etc/inittab file can be

Because the Linux inside changes the password does not enter the original password, therefore if forgets the password also may enter as the mode carries on the modification.

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.