1#uname-A # view kernel/OS/CPU Information2#Head-N1/etc/issue # Viewing the operating system version3#Cat/proc/Cpuinfo # Viewing CPU information4#hostname# view Computer name5# LSPCI-TV # List all PCI devices6# LSUSB-TV # list all USB devices7#Lsmod# list the loaded kernel modules8#Env# View Environment Variables9# Free-m # View memory usage and swap area usageTen#DF-H # View the usage of each partition One#du-SH< directory name ># View the size of the specified directory A#grepmemtotal/proc/Meminfo # View Total Memory -#grepmemfree/proc/Meminfo # Viewing the amount of free memory -#Uptime# View System uptime, number of users, load the#Cat/proc/loadavg # viewing system load -#Mount| Column-t # View the status of the attached partition -# fdisk-L # View all partitions -# Swapon-S # View all swap partitions +# hdparm-i/dev/HDA # View disk parameters (for IDE devices only) -# DMESG |grepIDE # viewing IDE device detection at startup +#ifconfig# View the properties of all network interfaces A# iptables-L # View firewall settings at# route-N # View the 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 # Real-time display of process status in#W# View Active Users -#ID< user name ># View specified user information to# Last# View User login log +#Cut-D:-f1/etc/passwd# View All users of the system -#Cut-D:-f1/etc/Group # View all system groups the# crontab-l # View all user's scheduled tasks
Linux Server Maintenance Common commands