linux-() Shell in Linux

Source: Internet
Author: User

Linux operating system can be divided into shell and kernel two parts, kernel is the kernel, provides the core functions of the operating system. The shell is the shell, which is connected to the kernel (kernel) and the user. This means that the user uses the shell to kernel the function of the body.

The Linux shell is divided into two types, namely the CLI and GUI

Cli:command lines Interface Command line interface

Gui:graphical User Interface GUI

Different Linux distributions may have different GUIs (more common such as gnome), and some systems do not have a GUI, such as the smallest lite version of CentOS. And the CLI is basically provided, if not the user can not be used. Each Linux CLI is basically bash.

You can open the shell using a tool like Xshell, or open a command-line window under the GUI.

In bash, the root user begins with #, and starts with a regular user.


Use the history command in bash to view a bash's historical record. With history, you can simplify bash operations:

Press the UP arrow to display the previous command

Press the down arrow to display the next command

!! Repeat the previous command

! Character repeats a command that begins with "character"

! Num executes the command according to the sequence number of the history record

!? ABC repeats the command containing ABC before

! -N Repeats the command before the n command

Through Ctrl+r, you can search for commands in the history record

Press ESC to press the. Key to repeatedly invoke the arguments in the previous command


To switch users through the SU command in the CLI:

Su-user name

Omitting the user name switches to the root user, each time the user switches to a new runtime environment, so the current directory becomes the user's root directory after each user switch.

The sudo command is to run the command with an administrator

ID to display the current user information

passwd command to change password


Bash Job Management:

If you want a command to run in the background, add a & symbol after the command

Pause and stop programs: CTRL + C is the terminating program, CTRL + Z is the pause program

The jobs command shows the background process

BG Serial Number (the number shown in jobs) keeps the paused process running in the background

FG Sequence number causes background process to foreground


Reprint please indicate the source

Http://blog.csdn.net/redstarofsleep

linux-() Shell in Linux

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.