Common Linux Operations

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. The symbol for the home directory is represented by ~. The
3.linux file system is a tree structure. The root of the
Linux file system is rooted, denoted by a symbol "/".
using symbols in the Linux file system "..." Represents a parent directory. Use symbols in the
Linux file system. Represents the current directory.
in the Linux file system, if the file uses "." First, it means that the hidden file
Linux paths are represented in two ways, an absolute path (a path beginning with "/") and a relative path
4. Command CD (change directory): Jump to another directory
5. Command ls: See what's in the directory
Ls-l: Show Details
ls-a: Show hidden files
6. Command pwd: Displays the current location of
7. Command clear: Clear screen
/permissions
8. Command mkdir: Create folder
Mkdir-p: Create a parent folder recursively
9. Command touch: Create a blank file
10. Command more: View file contents
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): Moves the file, and another function is to rename the
****************
VI Operation:
(1) When using the Command VI F1 carriage return, entered the VI editor, is in a read-only state (only see can not write);
(2) Press the letter "I" (insert) or "a" (append) You can enter the editing state;
(3) Press the ESC key on the keyboard, and then press shift+: To enter the command state
If you enter the command Wq, which means to save the exit;
If you enter a command q! , meaning that you do not save the exit;
*********************************
Linux has 9-character permissions, rwx rwx rwx
This contains Read permissions, W represents write permissions, and x represents execute permissions,- Indicates no permissions

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 permissions of the group in which the creator is located;
The third group represents the rights of other people;

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

Common Linux Operations

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.