First introduction to linux(1)

what is linux

linux is an open source operating system

What is an operating system?

Operating system: a system software that controls and manages all computer software and hardware of a computer

Open source

Open source:
Free
Source code public
Anyone can make suggestions, and more people can monitor it
This can make an operating system stable and develop useful code more efficiently

How to install linux environment

Buy a cloud server in Huawei Cloud/Tencent Cloud/NetEase Cloud, etc. Choose CentOS 7.6-7.8
Then download xshell
Use xshell Remote login

basic instructions

ls

ls:View information about all files in the current directory
ls-a: View all files (including hidden ones)
ls-l: View file information
Insert image description here

pwd

Check in that directoryInsert image description here

cd

cd directory nameGo to the current directory
cd … Return to the upper directory
cd . Return to the current directory< /span> cd - Return to recent directory
cd ~ Return to home directory

Insert image description here

touch

touch Create a file
Insert image description here

mkdir

mkdir Create a directory
Insert image description here

rmdir and rm

rmdir Delete directory
rm Delete file/directory
rmdir Directories can only delete empty directories
rm -r deletes the specified directory and all directories and files below it
rm -f can delete files directly even if they are protected files.
rm -i will ask you if you want to confirm again when deleting

Insert image description here

man

man command: View the function and usage of the command
man ls
man touch
man mkdir a>
······

Insert image description here

cp

cp: copy
cp -f The copied file needs to be copied to the file, regardless of whether the copied file exists or not.
cp -i overwrite The user will be asked for the file fee
cp -r recursively processes the copy and copies the copied file including its sub-files
Insert image description here

mv

mv files/directories in the current directory specify the directory
Let the files/directories in the specified current directory go to the specified directory. If the specified directory does not exist, it will be automatically created in the current directory< /span>
Insert image description here
Here, put lll into the root directory. The directory becomes xxx because there was a xxx previously stored in the lll directory

Guess you like

Origin blog.csdn.net/dabai__a/article/details/134515720