[Study notes] Linux basic operations (1) --- command line BASH Basic operations

Source: Internet
Author: User
Tags clear screen
Course connection: command line BASH basic operations Shell1, Shell (Shell) is the intermediary between the user and the underlying operating system (usually the kernel), responsible for transmitting user commands and operations

Course connection: Basic command line BASH operations

Shell

1. Shell is an intermediary between the user and the underlying operating system (usually the kernel). It is responsible for transmitting user commands and operations to the underlying operating system.

2. there are two types of Shell: CLI and gui cli: Command Line Interface-Command Line Shell (Linux) GUI: Command Line Interface-graphical Shell (Mac, Windos default management mode) in Linux, the default GUI is GNOME and CLI is BASH.

BASH

1. prompt: # root user $ normal user <用户名> @ <主机名> <工作目录>

2. commands: Commands, options, and parameters.

3. Tab key completion: the automatic completion command automatically fills in the file name. if the file name cannot be completed, you can press the parameters twice to view possible commands or file names that may be supplemented.

4. use the up/down key to view history commands. use the history command to view historical invocation commands :!! Repeat the previous command! <字符> Repeat the previous command starting with "character! <数值> Run the command according to the sequence number of the history record !? <字符串> Repeat the previous command that contains the "string! - <数值> Repeat the commands before the "value" command
Ctrl + r History Search

Esc +. call the parameters of the previous command

5. is the wildcard * zero or multiple characters? Match a character [ <若干数字> ] Match a number in the range of "several numbers [ <若干字符> ] Match a letter in "several characters" [^ <若干字符> ] Match characters other than the list

6. Switch user su- <用户名> (Root by default) su-started new terminal su only switches user sudo + Run the command id as administrator to obtain information about the current user. passwd: modify the current user password.

7. job management + & Place the command in the background jobs to view the processes running in the background bg + <编号> Continue to execute a background task fg + <编号> Transfers a background task to the foreground

This command

View the host name uname to obtain the information of the current operating system-r: version number;-a (all) history View history Command su-switch user ID get user information passwd modify current user password sudo use administrator permission execute command clear screen ls list all files in the current working directory jobs View processes running in the background bg continues to run a background program. fg moves a background program to the foreground and stops sleep for some time.

Ctrl + z pause process Ctrl + c terminate process Ctrl + r History Search

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.