Opensuse character interface and graphical interface

Source: Internet
Author: User
1 -- opensuse12.1 how to enable character Interface

As we all know, you can modify the/etc/inittab file and the system runtime level (Change "initdefault" value to 3). After the system is started, the character interface is displayed by default. But today, on the Virtual Machine of opensuse12.1, I tried this method repeatedly and entered the graphic interface. It seems that modifying inittab does not work.
Read the inittab file carefully and find the following:

 
# The default runlevel for sysvinit is defined here # Please note that for systemd the symbolic link #/etc/systemd/system/default.tar get has to relinked # To e.g. /lib/systemd/system/runlevel3.target # ID: 5: initdefault:

View the attributes of the "/etc/systemd/system/default.tar get" file:

 
$ L/etc/systemd/system/default.tar getlrwxrwxrwx/etc/systemd/system/default.tar get->/lib/systemd/system/runlevel5.target

It is found that it is a soft link always pointing to "/lib/systemd/system/runlevel5.target". Even if we change "initdefault" to "3", the soft link remains unchanged, the problem appears here.

Therefore, to enter the character interface, perform the following two steps:
First, modify the value of initdefault to the following:

 
ID: 3: initdefault:

Second, modify the file pointing to the soft link "/etc/systemd/system/default.tar get.

 
$ RM/etc/systemd/system/default.tar get $ ln-S/lib/systemd/system/runlevel3.target/etc/systemd/system/default.tar get

After modifying the configuration as described above, the reboot system will be able to access the character interface.
2 -- switch from the character interface to the graphic interface

Switch the character interface to the graphic interface:
Method 1:Enter the graphic interface temporarily from the character interface. Enter startx or init 5 in the command line to start the graphic interface.
Method 2:The graphic interface is displayed when the device is started. edit/etc/inittab to set the startup parameter to 5 (the method is as above to enter the character interface for reverse operations ). 3 -- switch from graphical interface to character Interface

If we are currently in the graphic interface, we can force exit X-window as follows to enter the character interface: open a terminal and enter init 3.

4 -- six running levels defined in inittab

Init is indispensable for Linux system operations.Program. Is a user-level process started by the kernel. After the kernel is started (it has been loaded into the memory, started to run, and initialized to all the device drivers and data structures, start a user-level program init to start other user-level processes or services. Therefore, init is always the first process (its PID is always 1 ). In the past, the kernel used init to find it. The correct position (for Linux) is/sbin/init. if the kernel cannot find init, it will try to run/bin/sh. If the run fails, the system will also fail to start.

# Runlevel 0 is system halt (do not use this for initdefault !) # Runlevel 1 is single user mode # runlevel 2 is local multiuser without remote network (e.g. NFS) # runlevel 3 is full multiuser with network # runlevel 4 is not used # runlevel 5 is full multiuser with network and xdm # runlevel 6 is system reboot (do not use this for initdefault !) #

The Linux operating system has six different run levels. Different run levels have different states. These six run 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 ).

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.