Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the commands commonly used by Linux enterprise operation and maintenance personnel

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail what commands are commonly used by Linux enterprise operation and maintenance personnel. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

The details are as follows

Command

Function description

Online query and help commands (2)

Man

Check out command help, command dictionaries, and, more complex, info, but not often.

Help

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

File and directory operation commands (18)

Ls

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

Cd

Full spelling change directory, the function is to switch from the current working directory to the specified working directory.

Cp

Full spelling copy, its function is to copy files or directories.

Find

Search means to find the directory and the files under the directory.

Mkdir

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

Mv

Full spelling move, its function is to move or rename files.

Pwd

Full spelling print working directory, its function is to display the absolute path of the current working directory.

Rename

Used to rename files.

Rm

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

Rmdir

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

Touch

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

Tree

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

Basename

Displays the file or directory name.

Dirname

Displays the file or directory path.

Chattr

Change the extended properties of the file.

Lsattr

View file extension properties.

File

Displays the type of file.

Md5sum

Calculate and verify the MD5 value of the file.

View file and content processing commands (21)

Cat

Full spelling concatenate, the function is to connect multiple files and print to the screen output or redirect to the 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

The contents of the file are displayed in pages.

Less

Pagination shows the contents of the file, the opposite use of the more command.

Head

Displays the header of the contents of the file.

Tail

Displays the tail of the file contents.

Cut

Splits and outputs each line of the file according to the specified delimiter.

Split

Split the file into different small pieces.

Paste

Merge the contents of the file by line.

Sort

Sorts the text contents of the file.

Uniq

Remove duplicate lines. 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, compare the differences of files, often used in text files.

Vimdiff

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

Rev

Output the contents of the file in reverse.

Grep/egrep

Filter string, three Musketeers third.

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 and compress. Oldboy

Unzip

Extract the file.

Gzip

Gzip Compression tool.

Zip

Compression tool.

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 diagnosing system faults.

Uptime

Displays the system running time and load.

Stat

Displays the status of the file or file system.

Du

Calculate disk space usage.

Df

Report the use of disk space in the file system.

Top

Real-time display of system resource usage.

Free

Check the system memory.

Date

Displays and sets the system time.

Cal

View calendar and other time information.

Search file commands (4)

Which

Find the binary command by the path of the environment variable PATH.

Find

Traverse from disk to find files or directories.

Whereis

Find the binary command by the path of the environment variable PATH.

Locate

Find the command from the database (/ var/lib/mlocate/mlocate.db) and update the library using updatedb.

User management commands (10)

Useradd

Add users.

Usermod

Modify user properties that already exist in the system.

Userdel

Delete the user.

Groupadd

Add a user group.

Passwd

Change the user's password.

Chage

Modify the validity period of the user's password.

Id

View the uid,gid of the user and the user group to which he belongs.

Su

Switch user identity.

Visudo

Exclusive commands for editing the / etc/sudoers file.

Sudo

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

Basic network operation commands (11)

Telnet

Log in remotely using the TELNET protocol.

Ssh

Log in remotely using the SSH encryption protocol.

Scp

Full spelling secure copy, used to copy files between different hosts.

Wget

Download the file on the command line.

Ping

Test the network connectivity between hosts.

Route

Displays and sets the routing table for the linux system.

Ifconfig

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

Ifup

Activate the network card.

Ifdown

Turn off the network card.

Netstat

View the network status.

Ss

View the network status.

Deep network operation commands (9)

Nmap

Network scan command.

Lsof

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

Mail

Send and receive mail.

Mutt

Message management commands.

Nslookup

Commands for interactively querying Internet DNS servers.

Dig

Find the DNS parsing process.

Host

Query the command for DNS.

Traceroute

Track the routing status of data transmission.

Tcpdump

Command line bag grabbing tool.

Commands about disks and file systems (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 partition command, applicable to the following disk partitions of 2TB.

Parted

Disk partitioning command, which has no disk size limit, is commonly used for disk partitions below 2TB.

Mkfs

Format to create an Linux file system.

Partprobe

Update the hard disk partition table information of the kernel.

E2fsck

Check the ext2/ext3/ext4 type file system.

Mkswap

Create a Linux swap partition.

Swapon

Enable swapping partitions.

Swapoff

Close the swap partition.

Sync

Writes the data in the memory buffer to disk.

Resize2fs

Resize the ext2/ext3/ext4 file system.

Commands related to system permissions and user authorization (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

Displays or sets 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 user information that is currently logged in to the system.

W

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

Last

Displays the users who have logged in to the system.

Lastlog

Displays the last login information for all users in the system.

Users

Displays a list of all users who are currently logged on to the system.

Finger

Find and display user information.

Built-in commands and other (19)

Echo

Print a variable, or output a specified string directly

Printf

Format the result to standard output.

Rpm

Commands for managing rpm packages.

Yum

Automate and simplify the management of commands for rpm packages.

Watch

Execute the given command periodically and display the output of the command in full screen mode.

Alias

Set up a system alias.

Unalias

Cancel the system alias.

Date

View or set the system time.

Clear

Clear screen, referred to as clear screen.

History

View the history of command execution.

Eject

Eject the optical drive.

Time

Calculate the execution time of the command.

Nc

Powerful network tools.

Xargs

Converts standard input to command line arguments.

Exec

A command that invokes and executes instructions.

Export

Sets or displays environment variables.

Unset

Delete a variable or function.

Type

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

Bc

Command line science calculator

System management and performance monitoring commands (9)

Chkconfig

Manage Linux system boot startup items.

Vmstat

Virtual memory statistics.

Mpstat

Displays status statistics for each available CPU.

Iostat

Statistical system IO.

Sar

Comprehensive access to the system's CPU, run queue, disk Imax O, paging (swap), memory, CPU interrupts and network and other performance data.

Ipcs

Used to report the status of interprocess communication facilities in Linux, including message lists, shared memory, and semaphores.

Ipcrm

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

Strace

Used to diagnose and debug the Linux user space tracker. We use it to monitor the interaction between user-space processes and the kernel, such as system calls, signaling, process state changes, and so on.

Ltrace

The command tracks the library function calls of the process, and it shows which library function is called.

Commands for shutdown / restart / logout and viewing system information (6)

Shutdown

Turn it off.

Halt

Turn it off.

Poweroff

switch it off.

Logout

Log out of the currently logged in Shell.

Exit

Log out of the currently logged in Shell.

Ctrl+d

The shortcut key to exit the currently logged in Shell.

Process management related commands (15)

Bg

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

Fg

Transfer the commands in the background to the foreground to continue to run.

Jobs

See how many commands are currently running in the background.

Kill

Terminate the process.

Killall

Terminates the process by its name.

Pkill

Terminates the process by its name.

Crontab

Scheduled task command.

Ps

Displays a snapshot of the process.

Pstree

The tree shows the progress.

Nice/renice

Adjust the priority of the program to run.

Nohup

Ignore the suspend signal to run the specified command.

Pgrep

The process of finding matching criteria.

Runlevel

View the current runlevel of the system.

Init

Toggle the run level.

Service

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

This is the end of this article on "what are the common commands of Linux enterprise operation and maintenance personnel?". I hope the above content can be helpful to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report