Summary of commonly used commands for system inspection under Linux

巴扎黑
Release: 2017-08-22 14:21:01
Original
2026 people have browsed it

Linux systems require regular inspections to check the usage of server software and hardware, which is equivalent to a physical examination of a person, to ensure that problems can be discovered and solved in time, and losses can be reduced. Commonly used inspection commands are as follows:

# uname -a # View kernel/operating system/CPU information

# head -n 1 /etc/issue # View operating system version

# cat /proc/cpuinfo # View CPU information

# hostname # View the computer name

# lspci -tv # List all PCI devices

# lsusb -tv # List all USB devices

# lsmod # List loaded kernel modules

# env # View environment variables

# free -m # View memory usage and swap area usage

# df -h # Check the usage of each partition

# du -sh < directory name> # Check the size of the specified directory

# grep MemTotal /proc/meminfo # Check the total memory

# grep MemFree /proc/meminfo # Check the amount of free memory

# uptime # Check the system running time, number of users, and load

# cat /proc/loadavg # Check the system load

# mount | column -t # Check the attached partition status

# fdisk -l # Check all partitions

# swapon -s # Check all swap partitions

# hdparm -i /dev/hda # View disk parameters (only applicable to IDE devices)

# dmesg | grep IDE # View the IDE device detection status during startup

# ifconfig # View Properties of all network interfaces

# iptables -L #View firewall settings

# route -n #View routing table

# netstat -lntp #View all listening ports

# netstat -antp # View all established connections

# netstat -s # View network statistics

# ps -ef # View all processes

# top # Display process status in real time

# w # View active users

# id < username> # View specified user information

# last # View user login Log

# cut -d: -f1 /etc/passwd # View all users in the system

# cut -d: -f1 /etc/group # View all groups in the system

# crontab -l # View all users’ scheduled tasks


The above is the detailed content of Summary of commonly used commands for system inspection under Linux. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!