3, Linux Commands

1、cd

The role of the cd command is to go to a directory

cd test: representation to the current directory test subdirectory

 

cd ..: to represent the current directory in the parent directory

cd / usr: usr directory to the root directory, in fact, equivalent to cd / and then cd usr

2、ll

ll command for folders and files in the directory list, folder or file name will, time, and other properties are brought out

3, ls

ls command is used folders and files in the directory list, only the folder or file name to set out

4、shutdown

This command is used to shut down, it can be parameterized, with no parameters may

shutdown: one minute after shutdown, you can use the shutdown -c cancel

shutdowm -t -2: indicates two minutes after the shutdown, may be used to cancel shutdown -c

shutdown -r: representation shutdown restart, but not immediately shut down restart, shutdown will restart in a minute, but you can enter shutdown -c cancel

5、vim

vim to open the file, and then edit, move the mouse over the letters you want to change, you can directly delete or modify, delete use the delete key

6、:wq!

After modifying the contents of the file, input:! Wq Save the file and exit the editor express mode, will be positioned to exit before the file open command line, the next line, where the vim command line:

7、:q!

If the file editing, saving you do not want to quit, you can directly enter:! Q command to achieve:

8、cat

If you just want to view the contents of files, not edit the contents of a file, you can use the cat command

9、pwd

If you want to view the current directory path, you can use the pwd command, which prints the current directory path

 

Guess you like

Origin www.cnblogs.com/wf2010517141/p/11094248.html
Recommended