# Commands are instructions for the computer to perform tasks. You can use commands to shut down the computer, or list the file list of the current directory, or the contents of the current text, or display a message on the screen.
If you are a newbie and trying to use the command line interface, we have collected a variety of basic Linux commands for you to learn and help you complete various tasks in various Linux distributions. Although it is not very detailed, it is very useful for Linux beginners, ordinary users, or administrators.
##1.ls – List
ls will list the contents (files or folders) of the current working directory, just like you open a folder in the GUI to see the contents.
2.mkdir – Make Directory
##mkdir
3.pwd – Print Working Directory
pwd displays the current working directory
##
4.cd – Change Directory
For the session currently running in the terminal, cd
5.rmdir – Remove Directory
rmdir
6.rm – Remove
##rm
7.cp – Copy
cp
8.mv – MoVe
##mv
9.cat – concatenate and print files
cat
10.tail – print TAIL (from last) >
##tail
11.less – print LESS
less
12.grep
#grep "
13.Find
This command will search for files matching the conditions in the given location. You can use the -name option of find
##find
-iname
14.tar
##The tar command can create, view and extract tar compressed files. tar -cvf
15.gzip
The gzip
16.unzip
#unzip
牛逼啊!接私活必备的 N 个开源项目!赶快收藏吧
17.help
18.whatis – What is this command
##whatis
19.man – Manual
man
20.exit
##exit is used to end the current terminal session.
21.ping
ping
22.who – Who Is logged in
who can list the currently logged in user name .
23.su – Switch User
su
24.uname
##uname will display important information about the system, such as kernel name, Host name, kernel version, processor type, etc., use uname -a to view all information.
25.free – Free memory
free will display the system's free memory, occupied memory, available swap memory and other information. free -m will convert the units in the result into KB, while free -g will convert into GB.
26.df – Disk space Free
df View disk usage in the file system – Used and available storage space on hard drives and other storage devices. You can use df -h to display the results in a human-readable format.
27.ps – ProcesseS
ps displays the running process of the system.
28.Top – TOP processes
The top command will display according to the CPU usage by default. For processes that occupy a large amount of space, you can use top -u
29.shutdown
shutdown is used to shut down the computer, and shutdown -r is used to restart the computer.
The above is the detailed content of 29 Linux commands you must know. For more information, please follow other related articles on the PHP Chinese website!