Home > Operation and Maintenance > Linux Operation and Maintenance > Summary of the 150 most commonly used commands by Linux enterprise operation and maintenance personnel

Summary of the 150 most commonly used commands by Linux enterprise operation and maintenance personnel

步履不停
Release: 2019-06-18 18:05:25
Original
3172 people have browsed it

Summary of the 150 most commonly used commands by Linux enterprise operation and maintenance personnel

Command

Function Description

Online query and help commands (2)

man

View command help, command dictionary, and more complex info, but it is not commonly used.

help

View help for built-in Linux commands, such as the cd command.

File and directory operation commands (18)

ls

Quan spelling list, the function is to list the contents of the directory and its content attribute information.

cd

Quan spell change directory, the function is to switch from the current working directory to the specified working directory.

cp

copy in full, its function is to copy files or directories.

find

The meaning of search is to find directories and files under the directories.

mkdir

Full spelling make directories, its function is to create directories.

mv

Quanpin move, its function is to move or rename files.

pwd

Quan spell print working directory, its function is to display the absolute path of the current working directory.

rename

## is used to rename files.

rm

Quan spelling remove, its function is to delete one or more files or directories.

rmdir

remove empty directories, the function is to delete empty directories.

touch

Create a new empty file and change the timestamp attribute of the existing file.

tree

The function is to display the contents of the directory in a tree structure.

basename

Display the file name or directory name.

dirname

Displays the file or directory path.

chattr

Change the extended attributes of the file.

lsattr

View file extension attributes.

file

Displays the type of file.

md5sum

Calculate and verify the MD5 value of the file.

View file and content processing commands (21)

cat

The full spelling of concatenate is used to connect multiple files and print to the screen or redirect to a specified file.

tac

tac is the reverse spelling of cat, so the function of the command is to display the file contents in reverse.

more

Display the file contents in pages.

less

Display the file contents in pages, the opposite usage of the more command.

head

Display the header of the file content.

tail

Display the tail of the file content.

cut

Split each line of the file according to the specified delimiter and output it.

split

Split the file into different small fragments.

paste

Merge file contents line by line.

sort

Sort the text content of the file.

uniq

Remove duplicate rows. oldboy

wc

Counts the number of lines, words or bytes of the file.

iconv

Convert the encoding format of the file.

dos2unix

Convert DOS format files to UNIX format.

diff

Full spelling difference, compares the differences between files, often used for text files.

vimdiff

Command-line visual file comparison tool, commonly used for text files.

rev

Reverse output file content.

grep/egrep

Filter string, the third of the Three Musketeers.

join

Merge by the same fields of two files.

tr

Replace or delete characters.

vi/vim

Command line text editor.

File compression and decompression commands (4)

tar

Packaging and compression. oldboy

unzip

Unzip the file.

gzip

gzip compression tool.

zip

Compression tool.

Information display commands (11)

uname

Command to display operating system related information.

hostname

Display or set the host name of the current system.

dmesg

Displays boot information and is used to diagnose system faults.

uptime

Displays system running time and load.

stat

Displays the status of a file or file system.

du

Calculate disk space usage.

df

Reports file system disk space usage.

top

Real-time display of system resource usage.

free

View system memory.

date

Display and set the system time.

cal

View calendar and other time information.

Search file commands (4)

which

Find binary commands and search according to the environment variable PATH path.

find

Traverse the disk to find a file or directory.

whereis

Find the binary command and search according to the environment variable PATH path.

locate

Find the command from the database (/var/lib/mlocate/mlocate.db), use updatedb Update library.

User management commands (10)

useradd

Add user.

usermod

Modify the user attributes that already exist in the system.

userdel

Delete user.

groupadd

Add user group.

passwd

Change user password.

chage

Change the user password validity period.

id

View the user's uid, gid and user group to which they belong.

su

Switch user identity.

visudo

Exclusive command for editing the /etc/sudoers file.

sudo

Execute the commands previously allowed in the sudoers file as another user (default root user).

Basic network operation commands (11)

telnet

Use TELNET protocol to log in remotely.

ssh

Use SSH encryption protocol to log in remotely.

scp

Secure copy is used to copy files between different hosts.

wget

Command line download file.

ping

Test the network connectivity between hosts.

route

Display and set the routing table of the linux system.

ifconfig

Commands to view, configure, enable, or disable network interfaces.

ifup

Start the network card.

ifdown

Close the network card.

netstat

Check the network status.

ss

Check the network status.

In-depth network operation commands (9)

nmap

Network scan command.

lsof

Full name list open files, which is to list the files that have been opened in the system.

mail

Send and receive emails.

mutt

Mail management commands.

nslookup

Command to interactively query the Internet DNS server.

dig

Find the DNS resolution process.

host

Command to query DNS.

traceroute

Trace data transmission routing status.

tcpdump

Command line packet capture tool.

Commands related to disk and file system (16)

mount

Mount the file system.

umount

Unmount the file system.

fsck

Check and repair Linux file systems.

dd

Convert or copy files.

dumpe2fs

Export ext2/ext3/ext4 file system information.

dump

##ext2/3/4 file system backup tool.

fdisk

Disk partition command, suitable for disk partitions below 2TB.

parted

Disk partition command has no disk size limit and is commonly used for disk partitions below 2TB.

mkfs

Format and create a Linux file system.

partprobe

Update the kernel’s hard disk partition table information.

e2fsck

Check ext2/ext3/ext4 type file system.

mkswap

Create a Linux swap partition.

swapon

Enable swap partition.

swapoff

Close the swap partition.

sync

Write the data in 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

Change the owner and group of a file or directory.

chgrp

Change the file user group.

umask

Display or set the permission mask.

Commands to view system user login information (7)

whoami

Displays the currently valid user name, which is equivalent to executing the id -un command.

who

Displays the information of the user currently logged in to the system.

w

#Displays the list of users who have logged in to the system and displays the instructions that the user is executing.

last

Displays the users logged into the system.

lastlog

Displays the latest login information of all users in the system.

users

Displays the user list of all users currently logged in to the system.

finger

Find and display user information.

Built-in commands and others (19)

echo

Print variables, or directly output the specified string

printf

Put the result Format output to standard output.

rpm

Command to manage rpm packages.

yum

Automate and simplify the commands for managing rpm packages.

watch

#Periodically execute the given command and display the command output in full screen mode.

alias

Set the system alias.

unalias

Cancel system aliases.

date

View or set the system time.

clear

Clear the screen, referred to as clear screen.

history

View the history of command execution.

eject

Eject the optical drive.

time

Calculate the command execution time.

nc

Powerful network tool.

xargs

Convert standard input into command line arguments.

exec

The command that calls and executes the instruction.

export

Set or display environment variables.

unset

Delete a variable or function.

type

is used to determine whether another command is a built-in command.

bc

Command Line Scientific Calculator

System management and performance monitoring commands (9)

##chkconfig

Manage Linux system startup item.

vmstat

Virtual memory statistics.

mpstat

Display status statistics of each available CPU.

iostat

Statistics system IO.

sar

Comprehensively obtain the system’s CPU, run queue, disk I/O, paging (swap area ), memory, CPU interrupts and network performance data.

ipcs

Used to report the status of inter-process communication facilities in Linux. The information displayed includes message list, shared memory and semaphore information.

ipcrm

Used to delete one or more message queues, semaphore sets or shared memory identifiers.

strace

is used to diagnose and debug Linux user space tracers. We use it to monitor the interaction between user space processes and the kernel, such as system calls, signal transmission, process state changes, etc. The

ltrace

command will trace the library function calls of the process, and it will show which library function is called.

Commands to shut down/restart/log off and view system information (6)

shutdown

Shut down.

halt

Shut down.

poweroff

Turn off the power.

logout

Quit the currently logged in shell.

exit

Exit the currently logged in Shell.

Ctrl d

Shortcut key to exit the currently logged in Shell.

Process management related commands (15)

bg

Convert a command that is paused in the background to continue execution (execute in the background).

fg

Move the command in the background to the foreground to continue running.

jobs

Check how many commands are currently running in the background.

kill

Terminate the process.

killall

Kill the process by its name.

pkill

Kill the process by its name.

crontab

Scheduled task command.

ps

Displays a snapshot of the process.

pstree

Tree display process.

nice/renice

Adjust the priority of program running.

nohup

Ignore the pending signal and run the specified command.

pgrep

Find processes matching the conditions.

runlevel

View the current running level of the system.

init

Switch run levels.

service

Start, stop, restart and shut down system services, and also display the current status of all system services state.

For more Linux-related technical articles, please visit Linux Tutorial column for learning!

The above is the detailed content of Summary of the 150 most commonly used commands by Linux enterprise operation and maintenance personnel. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template