Linux basic commands

Source: Internet
Author: User

Commands are divided into internal commands and external commands

Priority: alias-internal command-hash-external command

The common basic commands are:

SU: Switching users

Who: Check all current accounts

WHOAMI: Check your account

Whereis: Find the specified file, command location

Whatis: Function of query command

Which: Displays the path of the executable command

Ifconfig: Find IP

PWD: Displays the current working directory path

CD: Change to the current directory home directory

Cd. : Change to current directory

Cd.. : Change to top level directory

CD ~: Change to home directory

CD-: Change to last Catalog

Cat: Display text file

-N: Number of lines starting from 1

-B: Number of non-empty lines

-S: Two rows or more blank lines, replaced by a row of blank lines

-e: Show $ at end of each line

Echo: Display text

Overwrite the original file

>>: Do not change the original file, only add in

CP: Copying Files and directories

RM: Deleting files or directories

LS: Lists the current directory or the specified directory

Free: Check Memory

mkdir: Creating a Directory

Touch: Create an empty file, change the file

RmDir: Delete Empty directory

MV: Move or rename files and directories

Help command:

Type,help,man,info



*: Match 0 or more characters

? : Matches any single character

~: Current User home Directory

~_: Previous working directory

~+: Current Working directory

[0-9]: matching number range

[A-z]: matches uppercase and lowercase letters

[A-z]: match uppercase letters

[* *]: matches any one of the characters in this list

[^***]: matches any characters in this list that are considered to be characters

Predefined character classes:

[:d Igit:]: Any number

[: Lower:]: any one lowercase letter

[: Upper:]: Any uppercase letter

[: Alpha:]: Any case letter

[: Alnum:]: Any letter or number

[: Space:]: white space character


Linux basic commands

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.