[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 GUICLI: 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:
  • Automatic completion command
  • Automatically complete file name
  • Unable to complete Parameters
You can view possible commands or file names that may be supplemented by two consecutive times.
4. History
  • Use the up/down key to view historical commands
  • Use the history command to view
Simplified Method for calling History 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 a new terminal
  • Su only switches users
  • Sudo + <cmd> run commands with administrator privileges
  • Id to obtain information about the current user
  • Passwd: change the current user password

7. Job Management
  • <Cmd> + & place commands in the background
  • Jobs
  • Bg + <No.> continue to execute a background task
  • Fg + <No.> move a background task to the foreground


This command


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.