Linux Common commands

Source: Internet
Author: User

File and folder operations

List the files and folders in the current directory: LS (to the effect: LiSt)

Green indicates executable file , blue indicates folder , white indicates normal file

Lists the file and folder details list under directory: Ls-l

Lists all files and folders under the directory, including hidden files, where the file name begins with a dot: ls-a

Lists all file and folder details under the directory, including hidden files: Ls-la or Ls-al (a may represent all)

Switch directory: CD [-P] (-p = Path parameter)

Return to Parent directory: CD.

Displays the location (or path) of the current folder (or directory): PWD (to the effect: print working directory)

Delete file: RM [-P]

Delete folder: Rm-r [path] (-r = recursively delete the contents of the folder, recursive English recursion)

System-related commands

View process: Top

Press the z key to see more clearly the current process changes

Press the Q key to exit the process view

View all processes: PS aux

Using the pipeline filtering process: PS aux | grep SSH (Filters the process that contains the SSH field. | As a symbol of the pipeline, the result of the left command is passed to the right of the pipe as input.

View current network conditions: ifconfig

Rebooting the system network: SYSTEMCTL restart

VI Editor

Open VI Editor: VI

Exit VI: Input: Q

Use VI to view files: VI [path]

Press the I key to enter edit mode

Save after editing: Press ESC to enter: WQ Press the ENTER key

Do not save after editing: Press ESC to enter: Q Press the ENTER key

Linux Common 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.