The most common thing we do under Linux is to perform some operations on the terminal. There are many ways to open the terminal. Right-click the mouse and select Open Terminal, or shortcut Ctrl Alt T. Next we Introducing the commonly used commands in Linux:
(1) View directory: ls is used to view all file information under the current path
(2) Create directory: mkdir creates a folder
(3) Switch directory: cd switches to the specified file
Online learning video tutorial sharing :linux video tutorial
(4) Copy files and directories: cp (source file) (target file)
cp-r can be specified Copy any specified directory (including subdirectories and files)
cp- f Delete the existing target file without prompting.
cp-i Contrary to the f option, a prompt will be given asking the user for confirmation before overwriting the target file. When you answer y, the target file will be overwritten, which is an interactive copy.
(5) Delete files and directories: rm (file or directory)
rm-rf You can specify to delete any directory or file, use with caution.
rm dir delete empty folder
(6) Rename files and directories mv(file or directory name) (new name)
(7) The reading command cat
cat has two uses. One is to display all the file contents in cat temp.py on the screen; the second is to put the contents of one file into another file, which is equivalent to the cp command cattemp.py temp1.py
Recommended related article tutorials:linux tutorial
The above is the detailed content of Introductory tutorial for using linux system. For more information, please follow other related articles on the PHP Chinese website!