176 operation and maintenance personnel commonly used Linux command table

Online inquiries and help command

man View command help
help help see the built-in command linux

File and directory operations command

cd Change directory
cp copy files or directories
find find, look for directories and files in the directory
mkdir to create a directory
mv move or rename files
pwd Displays the current working directory absolute path to
rename rename files
rm remove files or directories
to delete empty directories rmdir
touch create a new empty file, or change the existing file timestamps
tree has a tree structure to display the directory
basename display the file or directory name
dimame display the file or directory path
chattr change file extensions attributes
lsattr view files with extended attributes
file display file types
MD5 value calculation and verification document md5sum

View documents and content processing command

cat connecting a plurality of files and print output to a screen or redirected to a file
tac cat and reverse spelling
more paging file contents
less paging file contents, the use of more of the opposite
head of the head of the content display file
tail tail display file contents
each line of cut between the file divided by a specified delimiter and outputs the
split divided files for different small fragments
paste in rows and merge file contents
sort sort text file
uniq remove duplicate rows
rows wc statistics file, the number of words, word section number
coding format conversion file iconv
dos2unix converted into a UNIX file format DOS format
difference diff comparison file, a text file used
vimdiff visual comparison command line tools, commonly used in the text file
rev inverted output evening content
grep / egrep filter string
join the same field two files into
tr replace or delete characters
vi / vim command-line text editor

File compression and decompression command

tar package compression
unzip file decompress
gzip gzip compression tool
zip compression tool

Information display command

uname command displays information about the operating system's
hostname show hostname of the current system
dmesg displaying boot information for fault diagnosis system
uptime display system uptime and load
stat display file or file system status
du calculate disk space usage
df reports file system disk space usage of the
top real-time display system resource usage
free check the system memory
date display and set the system time
cal view the calendar, time information

Search Files command

Find binary commands which, according to the PATH environment variable to find the path
find the disk to find a file or directory traversal from
whereis locate the binary command, press the PATH environment variable to find the path
locate the Find command from the database (/var/lib/mlocate/mlocate.db), using updatedb update library

User Management Commands

useradd Adds user
user attributes usermod modify the existing system
userdel Delete user
groupadd to add a user group
passwd modify user passwords
chage change the user password expiration date
id view the user's uid, gid and ownership of the user group
su switch user identity
visudo edit / etc / sudoers exclusive command file
sudo to another user identity (default root) execute in advance sudoers file allows the command

Basic network operation command

telnet remote login using TELNET protocol
ssh remote login using SSH encryption protocol
scp remote copy
wget command to download a file
the network connectivity between the host ping test
route display and set the linux system's routing table
ifconfig to view, configure, enable or disable the network interface command
ifup interface up
ifdown closed card
netstat View network status
ss View network status

In-depth network operations command

nmap network scanning command
lsof lists the file system has been opened in
mail send and receive messages
mutt mail management command
command nslookup interactive query Internet DNS servers
dig DNS lookup resolution process
command queries the DNS host
traceroute trace data transmission route status
tcpdump command line packet capture tool

Order the disk and file system

mount mount a file system
umount unmount the file system
fsck file system check and repair linux
dd convert or copy files
dumpr2fs export ext2 / ext3 / ext4 file system information
dump ext2 / 3/4 file system backup tool
fdisk disk partitioning tool, the following applies to 2TB disk partition
parted disk partition tool, no disk size limit, commonly used in the following 2TB partition
mkfs create formatted linux file system
partprobe update kernel partition table information
e2fsck checks ext2 / 3/4 type of file system
mkswap create linux swap partition
swapon enable swap
swapoff closed swap
sync data in the buffer memory is written to disk
reize2fs adjustment ext2 / 3/4 file system size

System privileges and user authorization related commands

chmod change file or directory permissions
chown to change the ownership of a file or directory is a group
chgrp Change file user group
umask Display or set permissions mask

View the system user's login information command

whoami Displays the active user name, equivalent to execute id -un command
who displays the current user information registration system
w display a list of users already logged into the system, and displays a user instruction being executed
last display user login system
lastlog display system so user last logged information
for all users of the system users currently logged in user list
finger to find and display the user information

And other built-in command

echo variable printing, or direct the output of a specified string
printf format the results to standard output
rpm rpm package management command
command yum simplified automated management rpm package
watch output periodically execute a given command and command display in full screen
alias set up the system alias
unalias cancellation system alias
date to view or set the system time to
clear clears the screen, referred to as the clear screen
history history View command executed record
eject eject the optical drive
time calculation command execution time
nc powerful network tools
xargs standard input converted into a command-line arguments
exec calls and executes the instructions of command
export set or display environment variables
unset delete a variable or function
type used to determine whether another command is a built-in command
bc command-line scientific calculator

System management and performance monitoring command

chkonfig management linux system boot entry
vmstat virtual memory statistics
mpstat display each of the available CPU state statistics
iostat statistical system IO
sar overall access system's CPU, run queue, disk IO, swap, memory, CPU interrupts, and network performance data
ipcrm the original delete one or more message queues
strace for diagnostics, debugging linux user-space tracker
library function call ltrace command tracking process

Shutdown / restart / logoff and view system information command

shutdown shutdown
halt shutdown
poweroff Power off
logout to exit the currently logged-shell
Exit to exit the currently logged-shell
Ctrl + d exit the current login shell shortcuts

Process management related commands

bg in the background will be a pause command, becomes proceed (in the background)
fg command in the background will be raised to continue running the front desk
jobs to see how many of the current command run in the background
kill terminate the process
killall Kills processes by name
pkill by the name of the process to terminate the process
crontab scheduled tasks command
ps displays a snapshot of the process
pstree tree display process
nice / renice priority adjustment programs running
nohup ignore hangup signal runs the specified command
pgrep to find a matching process that matches
runlevel view the current system run level
init switching run-level
service to start, stop, restart and shut down the system. They can also display the current status of all system services

Published 14 original articles · won praise 8 · views 1043

Guess you like

Origin blog.csdn.net/weixin_46033563/article/details/104454623