Source: the banana child < br / > address: www.cnblogs.com/bananaaa/p/7774467.html
The Linux command is the command that manages the Linux system. The CPU, memory, disk drive, keyboard, mouse, and user are all files to a Linux system. The Linux system manages commands that are at the core of its functioning, similar to the DOS commands of the past. There are two types of Linux commands on the system: built-in Shell commands and Linux commands.
The command | Functional specifications |
---|---|
Online search and help commands (2) | |
man | See command help, dictionary of commands, and more complex info, but not often used. |
help | Check out the Linux built-in commands for help, such as the CD command. |
File and directory operation commands (18) | |
ls | List, the function is to list the contents of the directory and its content attribute information. |
cd | Fully spell Change Directory to switch from the current working directory to the specified working directory. |
cp | Full spell copy, its function is to copy a file or directory. |
find | Find means to find a directory and the files in the directory. |
mkdir | Make Directories, which let you create directories. |
mv | Full move, which moves or renames files. |
pwd | Print Working Directory, whose function is to display the absolute path of the current working directory. |
rename | Used to rename files. |
rm | Remove, which removes one or more files or directories. |
rmdir | Set out to “Remove Empty Directories”. |
touch | Create a new empty file and change the timestamp properties of an existing file. |
tree | The function is to display the contents of the directory in a tree structure. |
basename | Displays the file name or directory name. |
dirname | Displays the path to a file or directory. |
chattr | Change the extended properties of the file. |
lsattr | View the file extension properties. |
file | Displays the type of file. |
md5sum | Calculates and validates the MD5 values of the file. |
View files and content processing commands (21) | |
cat | Concatenate, the function is used to connect multiple files and print to screen output or redirect to a specified file. |
tac | Tac is the reverse spelling of cat, so the function of the command is to display the contents of the file in reverse. |
more | Paging the contents of the file. |
less | Paging to display the contents of a file, the opposite of the more command. |
head | The header that displays the contents of the file. |
tail | Displays the tail of the file’s contents. |
cut | Split and output each line of the file by the specified delimiter. |
split | Split the file into small pieces. |
paste | Merge file contents by line. |
sort | Sorts the text content of a file. |
uniq | Remove duplicate rows. oldboy |
wc | Count the number of lines, words, or bytes of the file. |
iconv | Converts the encoding format of the file. |
dos2unix | Convert DOS format files to UNIX format. |
diff | Full spelling difference, to compare the differences between files, often used in text files. |
vimdiff | Command-line visual file comparison tool, often used for text files. |
rev | Reverse output file contents. |
grep/egrep | Filter strings, Three Musketeers. |
join | Merge by the same field of the two files. |
tr | Replace or delete characters. |
vi/vim | Command line text editor. |
File compression and decompression commands (4) | |
tar | Pack compression. oldboy |
unzip | Unzip the file. |
gzip | The gzip compression tool. |
zip | Compression tools. |
Information display commands (11) | |
uname | A command that displays information about the operating system. |
hostname | Displays or sets the hostname of the current system. |
dmesg | Displays boot information for system fault diagnosis. |
uptime | Display system running time and load. |
stat | Displays the status of a file or file system. |
du | Calculate disk space usage. |
df | Reports on file system disk space usage. |
top | Real-time display of system resource usage. |
free | Look at system memory. |
date | Displays and sets the system time. |
cal | View time information such as calendar. |
Search for file commands (4) | |
which | Find binary commands by environment variable PATH PATH. |
find | To traverse a disk to find a file or directory. |
whereis | Find binary commands by environment variable PATH PATH. |
locate | From the database (/ var/lib/mlocate/mlocate db) find command, and use updatedb update library. |
User management commands (10) | |
useradd | Add users. |
usermod | Modify existing user properties on the system. |
userdel | Delete the user. |
groupadd | Add a user group. |
passwd | Change the user password. |
chage | Modify the user password expiration date. |
id | View the user’s UID, GID, and user group to which the user belongs. |
su | Switch user identity. |
visudo | Exclusive command to edit /etc/sudoers files. |
sudo | Executes commands previously allowed in the sudoers file as a different user (default root). |
Basic network operation commands (11) | |
telnet | Login remotely using the TELNET protocol. |
ssh | Login remotely using the SSH encryption protocol. |
scp | Full Secure Copy is used to copy files between different hosts. |
wget | Download files from the command line. |
ping | Test the network connectivity between hosts. |
route | Displays and sets up the routing table for the Linux system. |
ifconfig | Commands to view, configure, enable, or disable the network interface. |
ifup | Start the network card. |
ifdown | Close the network card. |
netstat | View network status. |
ss | View network status. |
In-depth network operation commands (9) | |
nmap | Network scan command. |
lsof | List Open Files is a list of files that have been opened on the system. |
Send and receive mail. | |
mutt | Mail management commands. |
nslookup | Interactive query Internet DNS server command. |
dig | Find the DNS resolution procedure. |
host | The command to query DNS. |
traceroute | Track the status of data transfer routes. |
tcpdump | Command line grab tool. |
Disk and file system commands (16) | |
mount | Mount the file system. |
umount | Unmount the file system. |
fsck | Check and repair the Linux file system. |
dd | Convert or copy files. |
dumpe2fs | Export ext2/ext3/ext4 file system information. |
dump | Ext2/3/4 file system backup tool. |
fdisk | Disk partitioning command for disk partitions up to 2TB. |
parted | Disk partitioning command, which has no disk size limit and is usually used for disk partitions up to 2TB. |
mkfs | Format to create a Linux file system. |
partprobe | Update kernel hard disk partition table information. |
e2fsck | Check the ext2/ext3/ext4 type file systems. |
mkswap | Create a Linux swap partition. |
swapon | Enable swap partitions. |
swapoff | Close the swap partition. |
sync | Writes data from the memory buffer to disk. |
resize2fs | Resize the ext2/ext3/ext4 file system. |
System permissions and user authorization related commands (4) | |
chmod | Change file or directory permissions. |
chown | Changes the owner and group of a file or directory. |
chgrp | Change the file user group. |
umask | Displays or sets the permission mask. |
View system user login information command (7) | |
whoami | Displays the current valid user name, which is equivalent to executing the ID-UN command. |
who | Displays the user information currently logged in to the system. |
w | Displays a list of users who have logged in to the system, and displays the instructions the user is executing. |
last | Displays the user who has logged into the system. |
lastlog | Displays the last login information of all users in the system. |
users | Displays a user list of all users currently logged in to the system. |
finger | Find and display user information. |
Built-in commands and others (19) | |
echo | Prints a variable, or simply prints the specified string |
printf | Formatted output to standard output. |
rpm | Commands to manage RPM packages. |
yum | Commands to automate and simplify the management of RPM packages. |
watch | Periodically executes a given command and displays the output of the command in full screen. |
alias | Set the system alias. |
unalias | Cancel the system alias. |
date | View or set the system time. |
clear | Clear the screen, simply clear the screen. |
history | View the history of command execution. |
eject | Eject the CD-ROM drive. |
time | Calculate the command execution time. |
nc | Powerful network tools. |
xargs | Converts standard input to command-line arguments. |
exec | A command that invokes and executes an instruction. |
export | Sets or displays environment variables. |
unset | Deletes a variable or function. |
type | Used to determine if another command is a built-in command. |
bc | Command line scientific calculator |
System administration and performance monitoring commands (9) | |
chkconfig | Manage Linux system boot items. |
vmstat | Virtual memory statistics. |
mpstat | Displays state statistics for each available CPU. |
iostat | Statistical system IO. |
sar | Full access to the system’s CPU, run queues, disk I/O, paging (swap area), memory, CPU interrupts, and network performance data. |
ipcs | Used to report the status of the interprocess communication facility in Linux, displaying information including message lists, shared memory, and semaphore information. |
ipcrm | Used to delete one or more message queues, semaphore sets, or shared memory identifiers. |
strace | Used to diagnose and debug Linux user space trackers. We use it to monitor user-space processes’ interactions with the kernel, such as system calls, signaling, process state changes, and so on. |
ltrace | The command tracks the process’s library function calls, and it shows which library function was called. |
Command to shut down/restart/log out and view system information (6) | |
shutdown | To turn it off. |
halt | To turn it off. |
poweroff | Turn off the power. |
logout | Quits the currently logged Shell. |
exit | Quits the currently logged Shell. |
Ctrl+d | Shortcuts to exit the currently logged Shell. |
Process management related commands (15) | |
bg | To change a command suspended in the background to continue (execute in the background). |
fg | Move the command in the background to the foreground to continue running. |
jobs | See how many commands are currently running in the background. |
kill | Terminate the process. |
killall | Terminates a process by its name. |
pkill | Terminates a process by its name. |
crontab | Timed task commands. |
ps | Shows a snapshot of the process. |
pstree | The tree shows the process. |
nice/renice | Adjust the priority of the program. |
nohup | Run the specified command ignoring a hang signal. |
pgrep | A process that finds a matching condition. |
runlevel | View the current running level of your system. |
init | Toggle the run level. |
service | Start, stop, restart, and close system services, and display the current status of all system services. |
Recent hot article recommended:
1.1,000+ Java interview questions and answers (latest version of 2021)
2. I finally got the IntelliJ IDEA activation code through open source project. How nice!
3. Ali Mock tool officially open source, kill all the Mock tools in the market!
4.Spring Cloud 2020.0.0 is officially released, a new and disruptive version!
5. “Java development manual (Songshan edition)” the latest release, fast download!
Feel good, don’t forget with thumb up + forward oh!