Linux Common commands

Source: Internet
Author: User

1) LS (list, listing)

Function: Use the list to display all the files in the current folder

Ls-a Show all files, including hidden files

Ls-l Display in detail

Ls-a-L ls-l-a ls-la ls-al four different ways are possible

2) CD (change directory, changing directories)

Function: Used to switch directories

Cd..

Note: . Represents a previous level directory

. Represents the current directory

3) PWD (print work directory)

Function: Prints out the current absolute path

4) mkdir (make directory, create folder)

Role: Create an empty folder

Mkdir-p Creating a folder for cascading

5) MV (move, mobile)

Action: Move files between directories, rename files

MV Source files Pathname Destination Files pathname

6) Touch function: Create an empty file

Touch pathname

7) CP (copy, duplicate)

Role: Copying Files or folders

CP source File Pathname target file pathname

Cp-r used to copy folders

Cp-f when forcing a copy of the actual operation, it is generally cp-f to copy the file, Cp-rf copy the folder

8) RM (remove, remove, delete)

Role: Used to delete files, folders

RM File Pathname

Rm-r Folder Pathname

9) Cat function: Display the contents of the file directly under the command line can also be used to input the file

RmDir (remove directory, delete folder)

Role: Delete Empty folders

The difference between rmdir and rm-r: rmdir can only delete empty folders, and rm-r delete empty folders and non-empty folders

One) ln (link, connection file)

Create soft Connection file: Ln-s source file name symbol connection file name

Ln-s src.c,linker.c, LINKER.C is a symbolic connection file for SRC.C.

Hard Connect: ln source file name connection file name

) Man

Role: Consult the man Manual for Help information

Man 1 ls 1 means the query is a Linux command

Man 2 XXX 2 indicates the Linux API is queried

Man 3 XXX 3 means the query is a C library function Note: When querying in the Man Manual, Exit press Q (q is the abbreviation for quit)

Apt-get)

Role: A program used to install and uninstall software online in Ubuntu

Apt-get Install Vim

Apt-get Remove Vim

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.