First 9 tips: 1. Everything in Linux is a file 2. Linux case sensitive 3. Enter "PWD" to know the current path. 4. "Su" switch user name "user," sudo passwd password "Change User Password 5. Add users: Useradd Username Passwd User Name 6. Enter "whoami" to know the current logon user. 7. CTRL + C can terminate the execution of a command. 8. startx enters the graphic interface 9. CTRL + ALT + t open terminal Command 1: Display files in a directory Ls can display the files in a directory, and the folder directory will be displayed in different colors. Common options: -A: displays all files, including hidden files. -L display details -D: only view the directory properties, used with L,-LD The detailed information displayed in-L is displayed from left to right.
File Type access permissions (owner, group, and others) Size of the files in the group to which the number of hard connections owner belongs (if a directory is a single directory size, the file size is a data block (512 bytes) the last modification time file name. The file type includes four parts. The first letter is of the file type. D directory -Binary files L soft connection file Each of the following nine letters is a part of three letters, representing the access permissions of the owner, owner group, and others. For Files R stands for readable W indicates writable X indicates executable For a directory R indicates you can view the files in the directory. W indicates that you can add or delete files in the directory. X indicates that the directory can be accessed. For example, if the access permission to a file is rwxr-XR, it indicates that the owner can read and write the file and the group can read and execute the file. Others can only read the file. Command 2: create a file and directory "Touch path file name" create a file under "path" without writing the path to indicate the current "Mkdir path directory name" create a directory under "path" without writing the path to indicate the current Note 1: naming rules for file names 1. Except/, all characters are valid.
2. It is not recommended that characters such as space characters, tabs, backspace characters, and. @ # $ & ()-be replaced by a hidden file) 3. Case Sensitive 4. Linux File name suffixes are meaningless, but are only marked Note 2: "/" is the root directory of the entire system. "." indicates the current directory, and ".." indicates the directory at the upper level. Command 3: delete a file and directory "RM path file name" delete "path" under "file name" do not write path to indicate current "RM-r path directory name" delete "directory name" under "directory name" do not write path to indicate current Command 4: Copy, paste, and rename "CP Path 1 XXX Path 2" copy the xxx file in Path 1 to Path 2 without writing the path to indicate the current "CP-r Path 1 XXX Path 2" Copy Path 1 XXX directory to Path 2 do not write path indicates current "MV Path 1 XXX Path 2 yyy" Cut the xxx file or directory under Path 1 to Path 2 and change it to YYY at the same time.