Commonly used basic commands in linux

Commonly used linux commands

Usually use these basic commands

1) cd: change directory.

2) cd.. Go back to the previous directory and cd directly into the default directory

3) pwd: Display the current directory path.

4) ls(ll): Both lists all files in the current directory, but ll (two ll) lists the content in more detail.

5) touch: Create a new file such as touch index.js, a new index.js file will be created in the current directory.

6) rm: delete a file, rm index.js will delete the index.js file.

7) mkdir: To create a new directory is to create a new folder.

8) rm -r: delete a folder, rm -r src delete the src directory

rm -rf / 切勿在Linux中尝试!删除电脑中全部文件!

9) mv move the file, mv index.html src index.html is the file we want to move, src is the target folder, of course, in this way, you must ensure that the file and the target folder are in the same directory.

10) Reset Reinitialize the terminal/clear the screen.

11) Clear to clear the screen.

12) History View command history.

13) help Help.

14) exit Exit.

15) # means comment

Guess you like

Origin blog.csdn.net/weixin_43215322/article/details/109456014