Common commands for viewing system configuration in Linux

# uname -a # View kernel/OS/CPU information
# head -n 1 /etc/issue # View OS version
# cat /proc/cpuinfo # View CPU information
# hostname # View computer name
# lspci -tv # List All PCI devices
# lsusb -tv # List all USB devices
# lsmod # List loaded kernel modules
# env # View environment variable resources
# free -m # View memory usage and swap usage
# df -h # View each Partition usage
# du -sh # View the size of the specified directory
# grep MemTotal /proc/meminfo # View the total amount of memory
# grep MemFree /proc/meminfo # View the amount of free memory
# uptime # View system running time, number of users, load
# cat /proc/loadavg # View system load disks and partitions
# mount | column -t # View mounted partition status
# fdisk -l # View all partitions
# swapon -s # View all swap partitions
# hdparm -i /dev/hda # View disk parameters (only for IDE devices)
# dmesg | grep IDE # View IDE device detection status at startup Network
# 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 process
# ps -ef # View all processes
# top # Real-time display of process status users
# w # View active users
# id # View specified user information
# last # View user login logs
# cut -d: -f1 /etc/passwd # View all users of the system

# cut -d: -f1 /etc/group # View all groups in the system
# crontab -l # View the current user's scheduled task service
# chkconfig –list # List all system services
# chkconfig –list | grep on # List all startups System service program
# rpm -qa # View all installed packages

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326449912&siteId=291194637