Teach you how to sum up the most basic linux commands

Base system commonly used commands
1. system-related commands

1.1ping test network connectivity
1.2nmtui graphical interface to configure the card address information
whether 1.3telnet remote service test normally open
1.4Shutdown off the system / reboot the system
-r 5 / now / 0: reboot the system / reboot the system immediately
-h 5 / now / 0: system / off system immediately
-C: cancel restart or closing operation
1.5man

--help command help command displays help information / display profile help
1.6mount
umount command to mount a disk storage device
disk storage device unload command
Umount / mnt (mount point)
1.7hostname modify the host name / host View full name
1,8systemctl
start systemctl / sTOP / restart
systemctl status
systemctl GET-default
systemctl the sET-default multi-user.target management services operation status start / restart / stop
the service name
service name --- View service running status
to view the system operating mode
to set the system operating mode
1.9 ifdown name of the NIC (eth0)
Ifup name of the NIC (eth0) the specified stop card services
start specified card services

&& the ifup eth0 eth0 ifdown
1.10 hostnamectl modified host name
Hostnamectl SET-hostname XXX
1.11 DF
-H
iscpu
Free
Free -H
W mounted disk information see / view the disk using the content
information displayed information is human readable
view CPU information
View memory information

Check load / view the log user information
1.12 blkid UUID identification information display disk
1,13 export to set environment variables
1.14 source immediately loaded environment variable configuration file
/ etc / Profile
1.15 Alias Alias View Settings / Settings alias
Aliass alias = "substitute command information"
1.16 unalias
unalias cancel alias alias settings
1.17 Which
Which cp command to view the absolute file path information
1.18 runlevel check the system level
1.19 the init
the Init 0 switching system run level
switching system run level
1.20 yum
yum -y install software to install the software name command
to install the specified software
1.21 RPM
RPM -ivh xxx.rpm installation package
1.22 uniq
uniq -c information cancel repeat
statistics duplicate message how many times the
1.23 uname
uname -a view system information

1.24 useradd to create the user
1,25 passwd
passwd - stdin modify user password
-free interaction Change Password
1.26 sz -y
rz -y download linux host data to the Windows host
will upload the data to a Windows host linux hosts
2. file directory command
2.1 create a directory mkdir command
-p command to create the directory

2.2.ls list data display system information
-d specifies the directory to see if there is
-a display all data (display hidden files)
information -h displays the human-readable information
-l displays the file attribute details

2.3cd Change directory
Cd / cd ~ quickly return the system to the user's home directory
cd .. to quickly return to the parent directory
cd ../ .. to quickly return to the parent directory
cd- quickly return to the previous directory where

2.4 pwd Displays the current path location information

Create a file 2.5touch

2,6 cat view the file contents

2.7 vi to edit the file contents
i into insert mode
: wq to save and exit
: q exit
:! Q Force Quit

2.8 echo the output to the screen
echo xx> file to enter information into a file

2.9cp Copy Data command
-r recursive copy data (copy command)
2.10mv movement command data / rename file name

2.11rm delete data command
-r recursive delete information
-f erase any information (ignore the message)
-rf force delete directory
2.12head view the file header information (10 lines before the contents of the default view)
head -n specify the content to see the first few lines of
2.13 tail end of the file to view information (10 contents default view)
tail -n after a specified see a few lines
tail -f / -F tracking changes in real-time view the file information
3 user management
3.1su switch user
su -
3,2id View user information / to see if the specified user exists
3.3whoami view the system log in as a user
advanced system commonly used commands
1 swordsman command
1.1find Find file command
1.2grep filtration filter file content
1.3sed replace the modified file contents
1.4awk log files for analysis processing

Guess you like

Origin blog.51cto.com/14526656/2438003