Article From:
commandFunctional description
Online query and help commands (2)
manView the command help, the command dictionary.
helpLook at Linux’s built-in command help, example CD command
File directory operation commands (18)
lsThe function of list is to list the contents and contents of the catalog.
cdFully spelling change directory, the function is to switch from the current directory to the specified working directory.
cpSpelling copy, whose function is to copy files or directories
findLookup, which is used to locate files in directory and directory.
mkdirFull spell make directories, its function is to create a directory
mvFull spell move, its function is to move or rename files
pwdSpelling print working directory, whose function is to display the current working directory.
renameUsed to rename a file
rmThe function of remove is to delete one or more files or directories.
rmdirRemove empty directories, the function of which is to delete empty directory.
touchCreate a new empty folder to change the timestamp attribute of existing files.
treeIts function is to display the contents in the directory under the tree structure.
basenameDisplay the name of the file or the name of the directory
dirnameDisplay a file or directory path
chattrChanging the extended properties of the file
lsattrView file extension properties
fileDisplay the type of the file
md5sumCalculating and checking the MD5 value of a file
View the file and content processing commands (21)
Fully spelling concatenate, the function is to connect multiple files and print to screen output or redirect to the specified file.
tactacIt is the reverse spelling of cat, whose function is to reverse the contents of the display file.
lessPaging displays the contents of the file, and the reverse usage of the more command.
headThe header that displays the content of the file
tailThe tail of the display of the content of the file
cutSeparate and output each row of the file according to the specified separator.
splitSplit files for different small fragments
pasteMerge the contents of the file by line
Sorting of the contents of a file
To repeat the line
The number of rows, words, or bytes of a statistical file
The encoding format of the converted file
Convert DOS format files into UNIX format
diffDifference, comparing the differences between documents, commonly used in Chinese documents
 Command line visual text comparison tool, often used in text files.
rev Reverse output file content
grep/egrep Filter string
Merge the same fields in two files
trReplace the deleting character
text editor
File compression or decompression commands (4)
Packing compression
Unzip file
gzipCompression tool
Compression tool
Information display commands (11)
Commands to display the relevant information of the operating system
Display or set the host name of the current system
Display boot information for diagnosis of system failures
Update system time and load
Display the state of a file system or a file system
Computing disk space usage
Report file system disk space usage
Real time display system resource usage
View the system memory
Display and set system time
View the calendar and other system times
File search commands (4) 
Find binary commands, find paths based on environment variable PATH
Lookup files or directories from disk traversing
Find binary commands, find paths based on environment variable PATH 
Search command from database (/var/lib/mlocate/mlocate.db), use updatedb update library. 
User management commands (10)
Add users
Modifying the system has the property of the user
delete user
Add user groups
Modifying the user’s password
Modifying the validity period of the user’s password
View the user’s uid, GID, and the belonged user group
Switching user identity
Edit the exclusive command of the /etc/sudoers file
 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
sshRemote login using the SSH encryption protocol
scpSecure copy, for copying files between different hosts.
wgetCommand line downloading files
pingTesting the connectivity of the network between hosts
routeDisplay the routing table of the Linux system
ifconfigView, configure, start or disable the command of network interface
ifupboot adapter
ifdownClosing the network card
netstatView the state of the network
ssView the state of the network
Deep network operation commands (9)
nmapNetwork scan command
lsofList of files, lists the files that have been opened in the system.
mailSending and receiving mail
muttMail management command
nslookupInteractively querying the commands of the Internet DNS server
digFind the DNS parsing process
hostQuery the DNS command
tracerrouteTracking data transmission routing
tcpdumpCommand line package tool
Commands on disk and file systems (16)
mountMount file system
fsckCheck and fix the Linux file system
ddConverting or copying files
dumpe2fsExport ext2/ext3/ext4 file system information
dumpext2/ext3/ext4File system backup tool
fdiskDisk partition command for 2TB disk partition
partedDisk partition commands, which do not have disk size restrictions, are often used for disk partition below 2TB.
mkfsFormatting the creation of a Linux file system
partprobeUpdate the disk partition information of the kernel
e2fsckCheck the file system of the ext2/ext3/ext4 type
mkswapCreating Linux exchange partitions
swaponEnabling switching partitions
swapoffSwitch off the exchange partition
syncWrite the data in the memory buffer into the disk
resize2fsAdjust the file system size of the ext2/ext3/ext4 type
System permissions and user authorization related commands (4)
chmodChange the file or directory permissions
chownA group of owners and genera that change files or directories
chgrpChange 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
usersDisplays the list of users of all users currently logged in.
fingerLookup and display user information
Built-in commands and others (19)
echoPrint variables, or output directly to the specified string.
printfFormatting the results to standard output
rpmThe command to manage the RPM package
yumAutomation and simplification of the command of the management of RPM packages
watchPeriodically execute the given command and display the command output in full screen mode.
aliasSetting the system alias
unaliasCancelling the system alias
dateView or set system time
clearClear screen
historyView the history of the command execution
timeCalculate command execution time
ncA powerful network tool
xargsConverting standard input into command line parameters
execA command that calls and executes instructions
exportSetting or displaying a bad environment variable
unsetDelete variables or functions
typeUsed to determine whether another command is a built-in command
bcCommand-line scientific calculator
System management and performance monitoring commands (9)
chkonfigManaging the startup of the Linux system
vmstatVirtual memory statistics
iostatStatistical system IO
sarThe performance data of CPU, run queue, disk I/O, paging (swap area), memory, CPU interrupt and network are comprehensively obtained.
ipcsIt 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.
ipcrmIt is used to delete one or more message queues, semaphore sets, or shared memory identifiers.
straceIt 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.
ltraceThe 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)
shutdownTurn off the machine
haltTurn off the machine
poweroffTurn off the power supply
logoutExit the currently logged shell
exitExit the currently logged shell
Ctrl+dExit the current shell shortcut key
Process management related commands (15)
bgTurn a command suspended from the background into execution (in the background).
fgAdjust the command in the background to the front desk to continue running
jobsSee how many commands that are running in the background
killTermination process
pkillTerminating process by process name
crontabTimed task command
psDisplay the snapshot of the process
pstreeTree display process
nice/renicePrioritization of the run of the program
nohupIgnore the hang signal to run the specified command
pgrepLookup the process of matching conditions
runlevelView the current running level of the system
initSwitch run level
serviceStarting, 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 *