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

Source: Internet
Author: User

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 (root) $ normal user <username >@< Host Name> <working directory>

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! <Character> repeat the previous command starting with "character! <Value> execute the command according to the sequence number of the history record !? <String> repeat the command that previously contains "string! -<Value> 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 [<several numbers>] to match a number in the range of "several numbers" [<several characters>] to match a letter in the "several characters" [^ <several characters>] match characters other than the list

6. Switch user su-<User Name> (root by default) su-started the new terminal su only switches user sudo + <cmd> use the Administrator permission to execute the command id to obtain information about the current user passwd to change the current user password

7. Job Management <cmd> + & put the command in the background jobs to view the processes running in the background bg + <No.> continue to execute a background task fg + <No.> move a background task front-end

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

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.