Cat
Tail-f
Log file description
1 /var/log/message and error log after system startup is one of the most commonly used logs in red Hat Linux 2 /var/ log/Secure Security-related log information 3 /var/log/maillog Message-related log information 4 / var/log/cron log information related to timed tasks 5 /var/log/Spooler Log information related to UUCP and news devices 6 /var
System:
1 # uname-a # view kernel/OS/CPU information 2 # cat/etc/issue 3 # Cat/etc/redha T-Release # view OS version 4 # cat/proc/cpuinfo # View CPU information 5# hostname # view computer name 6 # LSPCI-TV # list all PCI devices 7 # LSUSB-TV # list all USB devices /c19>8# lsmod # list loaded kernel modules 9
Resources:
1 # free-M # View memory usage and swap usage 2 # DF- H # View each partition usage 3 # du-sh < directory name > # View the size of the specified directory 4 # grep memtotal/proc/meminfo # View Total Memory 5 # grep MEMFR ee/proc/Meminfo # View idle memory 6# uptime # View System uptime, number of users, load 7 # CAT/ PROC/LOADAVG # Viewing system load
Disks and partitions:
1 # Mount | Column-t # view attached partition status 2 # fdisk-L # View all partitions 3 # swapon-S # view all swap partitions /c7>4 # hdparm-i/dev/hda # View disk parameters (IDE device only) 5 # DMESG | grep IDE # view IDE device detection at startup
Internet:
1 # ifconfig # View the properties of all network interfaces 2 # iptables-L # View firewall settings 3 # route-N # View route table 4 # netstat-LNTP # View all listening ports 5 # netstat-ANTP # View all established connections 6
Process:
1 # PS-EF # View All Processes 2 # top # Real-time display process status (in another article there is a detailed introduction)
User:
1 # w # view active Users 2 # ID < user name > # View specified user information 3# Last # View user log on log 4 # cut-d:-f1/etc /passwd # View system All users 5 # cut-d:-f1/etc/Group# View system all groups 6
Service:
1 # chkconfig–list # list all system services 2 # Chkconfig–list | grep on # list all started system services
Program:
1 # rpm-qa # View all installed packages
Linux Common commands View logs