Linux Common commands

Source: Internet
Author: User

1. After logging into Linux via Remote Tools, the location is the home directory of the currently logged in user.

2. Symbols for home directories are represented by ~.

The 3.linux file system is a tree structure.   The root of the Linux file system is rooted, denoted by a symbol "/". Use the symbol "..." in the Linux file system   Represents a parent directory. Use symbols in the Linux file system "."   Represents the current directory. Linux file system, if the file uses "." First, there are two ways to represent the path of the hidden file Linux, one is the absolute path (the path begins with "/"), and the other is the relative path

4. Command CD (change directory): Jump to another directory

5. Command ls: See what is contained in the directory Ls-l: Show details Ls-a: Show hidden files

6. Command pwd: Displays the current location of the

7. Command clear: Clear Screen//permissions

8. Command mkdir: Create folder mkdir-p: Recursively create a parent folder

9. Command touch: Create a blank file

10. Command more: View the contents of a file

11. Command RM: Delete File command rmdir: Delete Folder command rm-rf: Delete file (clip), regardless of the level of depth, delete, and do not give a hint

12. Command CP (copy): Copy file, another feature is to create a new file

13. Command MV (move): Moving files, there is also a function is to rename the ********************************* VI operation:

(1) When using the Command VI F1 carriage return, entered the VI editor, in a read-only state (can not write);

(2) Press the letter "I" (insert) or "a" (append) to enter the editing state;

(3) Press the "ESC" key on the keyboard, then press shift+:, enter the command state if the input command Wq, means to save the exit; If you enter a command q! means not to save the exit; *********************************

The permissions for Linux are represented by 9-bit characters, rwx rwx rwx which R represents Read permission, W means write permission, X represents Execute permission,-Indicates no permission

This 9-bit character, each 3-bit group, is divided into 3 groups. The first group represents the rights of the Creator, the second group represents the rights of the Creator's group, and the third group represents the permissions of the other person;

Permissions can also be represented with a number. Rwx are represented by numbers as 4+2+1=7. The default permissions for newly created files are 644; The default permissions for newly created folders are 755.

Command chmod: Modify permissions, three groups using the U, G, o means, assign permissions to use "+", remove the permission to use "-".

chmod u+x F1//indicates that the creator of the file F1 increased execution rights

chmod o-r F1//Other person representing file F1 remove Read access

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.