Linux Startup interface switch: Gui-character Interface

Source: Internet
Author: User

From: http://blog.csdn.net/xznuwdh/article/details/6053860

Switch the Linux character interface to the graphic interface
Switching from the character interface to the graphical interface can be implemented in two simple ways:
1. Enter startx or init 5 on the Character interface.
2. By editing the/etc/inittab file, the GUI is displayed by default.
Change 3 in ID: 3: initdefault to 5, so that the system will directly enter the text mode after it is started.
The following section describes the content of the ETC/inittab file in the graphic mode:
# Default runlevel. The runlevels used by RHS are:
#0-halt (do not set initdefault to this)
#1-Single User Mode
# 2-multiuser, without NFS (the same as 3, if you do not have networking)
#3-full multiuser Mode
#4-unused
#5-x11 // select this option, and the system will enter the graphical logon interface upon logon.
# 6-reboot (do not set initdefault to this)
#
ID: 3: initdefault: // if it is changed to 3, the system will be guided to the text logon prompt interface.

Linux switch to graphical interface and multiple modes

1. Start the system to enter the text mode.
If you want to enable the system to automatically enter the plain text mode, modify the/etc/inittab and find the ID: 5: initdefault:. This line indicates that the running level is 5 at startup, that is, the graphic mode. If it is changed to 3, the text mode is changed to ID: 3: initdefault:. This is because the Linux operating system has six different running levels (run
Level), the system has different States under different running levels. These six running levels are:
0: Shutdown (remember not to set initdefault to 0, because this will make Linux unable to start)
1: single-user mode, just like the security mode in Win9x.
2: multiple users, but not NFS.
3: full multi-user mode, standard operation level.
4: It is generally not used. In some special cases, you can use it to do something.
5: X11, which means entering the X-window system.
6: restart (remember not to set initdefault to 6, because this will make Linux continuously restart ).
Among them, running level 3 is the standard console character interface mode we want to enter.
2. Force exit X-window to Enter text mode
Open a terminal, enter init 3 (note that there is a space behind init), and then enter the graphical interface. After the above method is switched, the window mode is completely closed. if files in the window are not saved, they will be lost. (init 5 can return to the GUI, but the original process is dead)
Method 1: run the command
# Startx, You need to configure the graphic interface information first (not now ~) ;
Method 2: Modify
ID: 3: initdefault, change 3 to 5, and restart the system;

Linux character interface and graphical interface Switch

What should I do if I forget the root password in Linux?
when the machine is started to grub for Operating System Selection, for Redhat Linux:
place the cursor on the Linux system with the up and down keys, press "E"
press "E" on the line with a kernel, enter "Space single", and press ENTER
press "B" to start, the system automatically enters the single-user mode.
use the passwd root command and enter the new password as prompted.
after modifying the password, enter the reboot command to restart the system.
For SuSE Linux:
press the "ESC" key to go from the grub graphic interface to the character interface.
then, place the cursor on the Linux system with the up/down key, and press "E"
press "e" in the line with the kernel, and enter "space 1 ", press ENTER
press "B" to start the instance. The system automatically enters "runlevel 1 ".
Run "passwd" and enter the new password as prompted.
after modifying the password, enter the reboot command to restart the system.
Linux character interface and graphical interface switch
1. After the hard disk-installed Linux is started on the GUI, you can use CTRL + ALT + F1 ~ 6. Switch to the character interface, and then use CTRL + ALT + F7 to switch to the graphic interface.
for Linux instances installed on virtual machines, the CTRL + ALT key is blocked, and other hot keys must be used: CTRL + ALT + Shift + F1 ~ 6. Switch to the character interface. Use Alt + F7 to return to the graphic interface.
2. If you directly enter the character interface for each startup, modify the ETC/inittab file and change the startup level from 5 to 3.

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.