RedHat command line and graphical interface Switch

Source: Internet
Author: User
1. the Linux GUI and command interface are switched to a Linux system with RedHat installed in the virtual machine. By default, the graphic interface is displayed. You can press Ctrl + Alt + Fn (n = 1, 2, 3, 4, 5, 6) to switch from the Linux GUI to the command interface, but Ctrl + Alt has been occupied in the virtual machine, that is, the cursor switches out of the VM. Therefore, press Ctrl + Shift + Alt + Fn (n = 1, 2, 3, 4, 5, 6 ). (What about Shenma? By default, the graphical interface is enabled, and

1. switch between the Linux GUI and command INTERFACE

The RedHat Linux system is installed in the virtual machine. By default, the graphic interface is displayed.

You can press Ctrl + Alt + Fn (n = 1, 2, 3, 4, 5, 6) to switch from the Linux GUI to the command interface, but Ctrl + Alt has been occupied in the virtual machine, that is, the cursor switches out of the VM. Therefore, press Ctrl + Shift + Alt + Fn (n = 1, 2, 3, 4, 5, 6 ). (What about Shenma? By default, the graphic interface is started. Press Ctrl + Alt + Fn (, 6) to enter the command line, and press Ctrl + Alt + F1 to return to the graphic interface)

Switch from the Linux Command interface to the graphic interface. You can press Alt + F7 (or enter the startx command to enter the graphic interface ).

You can modify the configuration file if you want to enter the command interface by default. The specific command is as follows (in the command interface, of course, it must be root or a user name with root permission ):

(1) vi/etc/inittab -- use the vi editor to edit the/etc/inittab File

(2) switch to INSERT mode by pressing I, that is, modify the mode.

(3) Find the line init: 5: initdefault in the file and change 5 to 3. What does 5 and 3 represent?

(4) Press Esc to exit INSERT mode

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

(6) wq (save and Exit)

If you do not want to modify it, q! (Exit without saving)

Restart to enter the command interface by default.

2. Linux running level

Linux has 7 running levels: init [0123456]

0: Shutdown

1: Single User

2: No network service in multi-user status

3: Multi-User Network Services

4: The system is not used and retained to the user.

5. Graphic Interface

6. Restart

The commonly used running levels are 3 and 5. to modify the running level, you can modify them in the file/etc/inittab. For details about how to modify the running level, refer to "1" to enter the interface by default.

If it is set to 1, it will shut down and set to 6, it will be restarted all the time.

3. Solution to modifying incorrect configurations

If you are not careful, set the running level to 1 or 6 and cannot enter Linux normally, you can follow the methods below. (Of course, when GRUB does not have a password)

(1) when the system is being started for several seconds, press "e" to enter the GRUB boot Interface

(2) Highlight the second line and enter "e" to enter

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

(4) Press enter to return to the GRUB interface.

(5) Press "B" to enter the single-user mode.

(6) in single-user mode, modify the/etc/inittab file according to 1.

Because you do not need to enter the original password to change the password in Linux, you can also change the password in single-user mode if you forget the password.

For more information about RedHat, see RedHat topic page http://www.linuxidc.com/topicnews.aspx? Tid = 10

This article permanently updates the link address: Http://www.linuxidc.com/Linux/2015-10/124055.htm

Related Article

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.