#ls [path] lists the names of folders and folders under the specified path, and if no path is specified, then see templates, pictures, downloads, desktops, videos, documents, music and other options
#ls-L presents the above options as a list
#ls-la[Path] Indicates a list of folders and file names under the specified path (containing hidden files, hidden files beginning with '. ')
#clear put content on the top of the Web, empty the contents of the current screen, is actually empty
#init初始化 function: Switching syntax for Linux in run mode: #init (0-6)
#init3 to switch Linux from desktop mode to command line mode
#init5表示将linux从命令行模式切换到桌面模式
Init0 indicates shutdown, INIT1 represents single-user mode, Init2 represents multiuser mode, INIT4 is temporarily useless, INIT6 indicates restart
#su切换用户 Full Name Switch user
Syntax: #su需要切换到的用户名
For example: switch from root to admin #su admin
Switch from Admin user to root, need to enter password
Permissions from high to low do not password, from low to high need password
--------------------------------------------------------------------------------------------------------------- -
File Operations Command
1. File creation command: #touch file name Note: (The file name can be the full path), for example: #touch test.txt
2. Copy files: #cp where the copied files need to be saved, for example: #cp/root/test.txt/home/admmin/text.txt
3, move the command: #mv need to move the file target location, for example: #mv/home/admin/text.txt/home/text.txt
4, Delete command: #rm需要删除的文件-"Prompt whether to delete, enter Y or N, or Yes and no
If you do not want to be prompted, write this: #rm-f file to delete (F for Force, indicates coercion)
5. Rename command: #mv需要重命名的文件 a new name, for example: #mv/home/text.txt/test2.txt
--------------------------------------------------------------------------------------------------------------- -
Expand your knowledge
Shortcut keys:
CTRL + C means stop current command
CTRL + A quickly switches the cursor to the front of the command line (ahead)
Ctrl+e quickly switches the cursor to the last side of the command line (end)
Up ARROW and DOWN arrow Toggle History command
tab is used to complete the name of a file or folder, and you can press the tab 2 consecutive times to list folders and files that begin with a specific character in the specified directory.
Linux basic commands