Category:Linux
Article From:https://www.cnblogs.com/chenshikun/p/9116834.html
command Functional description
Online query and help commands (2)
man View the command help, the command dictionary.
help Look at Linux’s built-in command help, example CD command
File directory operation commands (18)
ls The function of list is to list the contents and contents of the catalog.
cd Fully spelling change directory, the function is to switch from the current directory to the specified working directory.
cp Spelling copy, whose function is to copy files or directories
find Lookup, which is used to locate files in directory and directory.
mkdir Full spell make directories, its function is to create a directory
mv Full spell move, its function is to move or rename files
pwd Spelling print working directory, whose function is to display the current working directory.
rename Used to rename a file
rm The function of remove is to delete one or more files or directories.
rmdir Remove empty directories, the function of which is to delete empty directory.
touch Create a new empty folder to change the timestamp attribute of existing files.
tree Its function is to display the contents in the directory under the tree structure.
basename Display the name of the file or the name of the directory
dirname Display a file or directory path
chattr Changing the extended properties of the file
lsattr View file extension properties
file Display the type of the file
md5sum Calculating and checking the MD5 value of a file
View the file and content processing commands (21)
cat
Fully spelling concatenate, the function is to connect multiple files and print to screen output or redirect to the specified file.
tac tacIt is the reverse spelling of cat, whose function is to reverse the contents of the display file.
more
less
less Paging displays the contents of the file, and the reverse usage of the more command.
head The header that displays the content of the file
tail The tail of the display of the content of the file
cut Separate and output each row of the file according to the specified separator.
split Split files for different small fragments
paste Merge the contents of the file by line
sort
Sorting of the contents of a file
uniq
To repeat the line
wc
The number of rows, words, or bytes of a statistical file
iconv
The encoding format of the converted file
dos2unix
Convert DOS format files into UNIX format
diff Difference, comparing the differences between documents, commonly used in Chinese documents
vimdiff
 Command line visual text comparison tool, often used in text files.
rev  Reverse output file content
grep/egrep  Filter string
join
Merge the same fields in two files
tr Replace the deleting character
vi/vim
text editor
File compression or decompression commands (4)
tar
Packing compression
unzip
Unzip file
gzip
gzipCompression tool
zip
Compression tool
Information display commands (11)
uname
Commands to display the relevant information of the operating system
honstname
Display or set the host name of the current system
dmesg
Display boot information for diagnosis of system failures
uptime
Update system time and load
stat
Display the state of a file system or a file system
du
Computing disk space usage
df
Report file system disk space usage
top
Real time display system resource usage
free
View the system memory
date
Display and set system time
cal
View the calendar and other system times
File search commands (4) 
which
Find binary commands, find paths based on environment variable PATH
find
Lookup files or directories from disk traversing
whereis
Find binary commands, find paths based on environment variable PATH 
locate
Search command from database (/var/lib/mlocate/mlocate.db), use updatedb update library. 
User management commands (10)
useradd
Add users
usermod
Modifying the system has the property of the user
userdel
delete user
groupadd
Add user groups
passwd
Modifying the user’s password
chage
Modifying the validity period of the user’s password
id
View the user’s uid, GID, and the belonged user group
su
Switching user identity
visudo
Edit the exclusive command of the /etc/sudoers file
sudo
 Use another user identity (default root user) to execute commands previously allowed in the sudoers file.
Basic network operation commands (11)
telent Remote login using the TELNET protocol
ssh Remote login using the SSH encryption protocol
scp Secure copy, for copying files between different hosts.
wget Command line downloading files
ping Testing the connectivity of the network between hosts
route Display the routing table of the Linux system
ifconfig View, configure, start or disable the command of network interface
ifup boot adapter
ifdown Closing the network card
netstat View the state of the network
ss View the state of the network
Deep network operation commands (9)
nmap Network scan command
lsof List of files, lists the files that have been opened in the system.
mail Sending and receiving mail
mutt Mail management command
nslookup Interactively querying the commands of the Internet DNS server
dig Find the DNS parsing process
host Query the DNS command
tracerroute Tracking data transmission routing
tcpdump Command line package tool
Commands on disk and file systems (16)
mount Mount file system
umount umount
fsck Check and fix the Linux file system
dd Converting or copying files
dumpe2fs Export ext2/ext3/ext4 file system information
dump ext2/ext3/ext4File system backup tool
fdisk Disk partition command for 2TB disk partition
parted Disk partition commands, which do not have disk size restrictions, are often used for disk partition below 2TB.
mkfs Formatting the creation of a Linux file system
partprobe Update the disk partition information of the kernel
e2fsck Check the file system of the ext2/ext3/ext4 type
mkswap Creating Linux exchange partitions
swapon Enabling switching partitions
swapoff Switch off the exchange partition
sync Write the data in the memory buffer into the disk
resize2fs Adjust the file system size of the ext2/ext3/ext4 type
System permissions and user authorization related commands (4)
chmod Change the file or directory permissions
chown A group of owners and genera that change files or directories
chgrp Change the file user group
umask Display or set the permissions mask
View commands for system user login information (7)
whoami Displays the currently valid user name, which is equivalent to executing the ID -un command.
who Display user information of the current login system
w Displays the list of users who have logged in and displays the instructions that the user is executing.
lastlog  Users who display the login system
users Displays the list of users of all users currently logged in.
finger Lookup and display user information
Built-in commands and others (19)
echo Print variables, or output directly to the specified string.
printf Formatting the results to standard output
rpm The command to manage the RPM package
yum Automation and simplification of the command of the management of RPM packages
watch Periodically execute the given command and display the command output in full screen mode.
alias Setting the system alias
unalias Cancelling the system alias
date View or set system time
clear Clear screen
history View the history of the command execution
eject Quickset
time Calculate command execution time
nc A powerful network tool
xargs Converting standard input into command line parameters
exec A command that calls and executes instructions
export Setting or displaying a bad environment variable
unset Delete variables or functions
type Used to determine whether another command is a built-in command
bc Command-line scientific calculator
System management and performance monitoring commands (9)
chkonfig Managing the startup of the Linux system
vmstat Virtual memory statistics
iostat Statistical system IO
sar The performance data of CPU, run queue, disk I/O, paging (swap area), memory, CPU interrupt and network are comprehensively obtained.
ipcs It is used to report the state of inter process communication facilities in Linux, and the information displayed includes message list, shared memory and semaphore information.
ipcrm It is used to delete one or more message queues, semaphore sets, or shared memory identifiers.
strace It is used to diagnose and debug the Linux user space tracker. We use it to monitor user space processes and kernel interactions, such as system calls, signal transmissions, process state changes, etc.
ltrace The command will track the library function call of the process, and it will show which library function is invoked.
Commands for shutdown / restart / write off and view system information (6)
shutdown Turn off the machine
halt Turn off the machine
poweroff Turn off the power supply
logout Exit the currently logged shell
exit Exit the currently logged shell
Ctrl+d Exit the current shell shortcut key
Process management related commands (15)
bg Turn a command suspended from the background into execution (in the background).
fg Adjust the command in the background to the front desk to continue running
jobs See how many commands that are running in the background
kill Termination process
pkill Terminating process by process name
crontab Timed task command
ps Display the snapshot of the process
pstree Tree display process
nice/renice Prioritization of the run of the program
nohup Ignore the hang signal to run the specified command
pgrep Lookup the process of matching conditions
runlevel View the current running level of the system
init Switch run level
service Starting, stopping, restarting and closing system services, you can also show the current status of all system services.
Link of this Article: Linux common command set

Leave a Reply

Your email address will not be published. Required fields are marked *