search
HomeOperation and MaintenanceLinux Operation and MaintenanceSummary 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

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.

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.

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.

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!

Statement
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
The 5 Core Components of the Linux Operating SystemThe 5 Core Components of the Linux Operating SystemMay 08, 2025 am 12:08 AM

The five core components of the Linux operating system are: 1. Kernel, 2. System libraries, 3. System tools, 4. System services, 5. File system. These components work together to ensure the stable and efficient operation of the system, and together form a powerful and flexible operating system.

The 5 Essential Elements of Linux: ExplainedThe 5 Essential Elements of Linux: ExplainedMay 07, 2025 am 12:14 AM

The five core elements of Linux are: 1. Kernel, 2. Command line interface, 3. File system, 4. Package management, 5. Community and open source. Together, these elements define the nature and functionality of Linux.

Linux Operations: Security and User ManagementLinux Operations: Security and User ManagementMay 06, 2025 am 12:04 AM

Linux user management and security can be achieved through the following steps: 1. Create users and groups, using commands such as sudouseradd-m-gdevelopers-s/bin/bashjohn. 2. Bulkly create users and set password policies, using the for loop and chpasswd commands. 3. Check and fix common errors, home directory and shell settings. 4. Implement best practices such as strong cryptographic policies, regular audits and the principle of minimum authority. 5. Optimize performance, use sudo and adjust PAM module configuration. Through these methods, users can be effectively managed and system security can be improved.

Linux Operations: File System, Processes, and MoreLinux Operations: File System, Processes, and MoreMay 05, 2025 am 12:16 AM

The core operations of Linux file system and process management include file system management and process control. 1) File system operations include creating, deleting, copying and moving files or directories, using commands such as mkdir, rmdir, cp and mv. 2) Process management involves starting, monitoring and killing processes, using commands such as ./my_script.sh&, top and kill.

Linux Operations: Shell Scripting and AutomationLinux Operations: Shell Scripting and AutomationMay 04, 2025 am 12:15 AM

Shell scripts are powerful tools for automated execution of commands in Linux systems. 1) The shell script executes commands line by line through the interpreter to process variable substitution and conditional judgment. 2) The basic usage includes backup operations, such as using the tar command to back up the directory. 3) Advanced usage involves the use of functions and case statements to manage services. 4) Debugging skills include using set-x to enable debugging mode and set-e to exit when the command fails. 5) Performance optimization is recommended to avoid subshells, use arrays and optimization loops.

Linux Operations: Understanding the Core FunctionalityLinux Operations: Understanding the Core FunctionalityMay 03, 2025 am 12:09 AM

Linux is a Unix-based multi-user, multi-tasking operating system that emphasizes simplicity, modularity and openness. Its core functions include: file system: organized in a tree structure, supports multiple file systems such as ext4, XFS, Btrfs, and use df-T to view file system types. Process management: View the process through the ps command, manage the process using PID, involving priority settings and signal processing. Network configuration: Flexible setting of IP addresses and managing network services, and use sudoipaddradd to configure IP. These features are applied in real-life operations through basic commands and advanced script automation, improving efficiency and reducing errors.

Linux: Entering and Exiting Maintenance ModeLinux: Entering and Exiting Maintenance ModeMay 02, 2025 am 12:01 AM

The methods to enter Linux maintenance mode include: 1. Edit the GRUB configuration file, add "single" or "1" parameters and update the GRUB configuration; 2. Edit the startup parameters in the GRUB menu, add "single" or "1". Exit maintenance mode only requires restarting the system. With these steps, you can quickly enter maintenance mode when needed and exit safely, ensuring system stability and security.

Understanding Linux: The Core Components DefinedUnderstanding Linux: The Core Components DefinedMay 01, 2025 am 12:19 AM

The core components of Linux include kernel, shell, file system, process management and memory management. 1) Kernel management system resources, 2) shell provides user interaction interface, 3) file system supports multiple formats, 4) Process management is implemented through system calls such as fork, and 5) memory management uses virtual memory technology.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software