Linux x Window vs. command-line mode

Source: Internet
Author: User

How Linux is logged in

There are two main types of Linux default landing methods:

1. The landing environment of the text interface, also known as the command line INTERFACE,CLI,or the terminal interface (terminal or console).

2. The graphical user interface (graphical user Interface,gui) 's Landing environment, the X Window System (also known as X or X11) is a graphical user interface.

Linux defaults to 6 terminal to allow the user to log in, and the switch is to use the combination button: [Ctrl]+[alt]+[f1]~[f6]. The system names these 6 terminal interfaces as Tty1~tty6.

In the landing environment of the text interface, the user has Tty1~tty6 6 terminal interface, no graphical window interface;

In the graphical user interface of the landing environment, the user has Tty1~tty7 7 terminal interface, wherein the TTY7 is the default waiting for landing after the completion of the graphical environment.

If you start Linux as a command-line environment, the default tty7 is nothing, that is, the system switches to tty7 without any reaction. How do I start the X Window interface?

You can execute the following command after logging in any of the terminal interfaces of Tty1~tty6:

[[Email protected]~]# startx

However, not every X window can be successfully started with the STARTX command, at least the following points must be met for successful start-up:

    • Your tty7 and no other Windows software is running (Tty7 must be empty);
    • You have installed the X Window System, and X server can start smoothly;
    • You'd better have a window manager, for example Gnome/kde;
    • The services necessary to start the X window, such as the glyph server (x font server, XFS), must be started first.

Linux runtime (Run level)

There are seven operating levels (run level) of Linux:

    • Run Level 0: shutdown
    • Run Level 3: pure command line mode
    • Run Level 5: Includes graphical interface mode
    • Run Level 6: Restart

You can use the init command to switch modes, for example, you can restart and shut down using the following commands:

[[Email protected]~]# init 6

[[Email protected]~]# init 0

To modify the Linux system Landing environment:

If you want Linux to log in as a text interface every time you turn it on, you need to change the contents of the/etc/inittab, which will take effect after rebooting.

Execute the following command:

[[Email protected]~]# vim/etc/inittab

We just need to change the number 5 in the last line to the number 3, and then save it.

Id:5:initdefault: #修改之前

Id:3:initdefault: #修改之后

Then enter: Wq (with colon) can be saved successfully, this time the system will prompt: "/etc/inittab" 26L, 884C written

X Window System

X usually has two layers: Desktop manager and window manager.

The desktop Manager is a graphical-oriented user interface that allows users to interact with system programs by controlling the icons instead of entering the appropriate command for the shell. Most Linux distributions run GNOME Desktop Manager (www.gnome.org) by default, but X can also run KDE (www.kde.org) and many other desktop managers.

The window Manager is a program running under desktop Manager, which is mainly responsible for the following tasks: Opening and closing of windows, running of programs, setting of mouse, making the system do different work according to the click Mode and location. The window Manager allows for personalized display.

There are many popular window managers in X and Linux systems, and most Linux distributions provide metacity (the default window manager for GNOME2) and KWin (the default window manager under KDE), Fedora provides mutter (the default window manager under GNOME3), Mutty is the abbreviation for metacity Clutter (Clutter is the name of a graphics library).

Source: "Brother's Linux Private Cuisine" (third edition), "Linux command, editor and Shell Programming" (3rd edition)

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.