Objective
Turn out n years ago to study notes, feeling still a bit of use, put on blog memo, self-view use.
I. SYSTEM command Notes
1. System
% uname-A # View kernel/Os/cpu information
% Head-N 1/etc/issue # Viewing the operating system version
% Cat/proc/cpuinfo # Viewing CPU information
% hostname# View Computer Name
%LSPCI-TV # List all PCI devices
%LSUSB-TV # list all USB devices
% Lsmod# list the loaded kernel modules
% Env# View environment variable resources
% Free-M # View memory usage and swap area usage
% DF-H # View the usage of each partition
% du- SH< directory name > # View the size of the specified directory
% grepMemtotal/proc/meminfo # View Total Memory
% grepMemfree/proc/meminfo # Viewing the amount of free memory
% Uptime# View System uptime, number of users, load
% Cat/PROC/LOADAVG # Viewing system load
2. Disks and Partitions% Mount| COLUMN-T # Viewing the status of a mounted 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
3. Network
% ifconfig# View the properties of all network interfaces netstat- inch
% ifconfigEth0 Down # Disable
% ifconfigEth0 Up # Enabled
% ifconfigEth0 Unplumb # Stop NIC
% ifconfigEth0 Plumb # Enable NIC
% ifconfigEth0 192.168. 0.1Netmask 255.255. 255.0# Configure network card address
%iptables-l # View firewall settings
%route-n # Viewing the routing table
%NETSTAT-LNTP # View All listening ports
%NETSTAT-ANTP # View all established connections
%netstat-s # Viewing network statistics
4. Process% PS-EF # View All Processes
% PS-ef| grepUser # View ' User 'All processes
%top # Real-time display of process status
5. User% W# View Active Users
% ID< user name > # view specified user information
% 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
%crontab-l # View Current user's scheduled tasks
6. Service%chkconfig--list # List all system services
%chkconfig--list | grepOn # list all started system services
%service vsftpd Start # vsftpd
%chkconfig--list | grepVSFTPD # view VSFTPD Service status
%chkconfig vsftpd on # changed to VSFTPD service for default startup,% VI/etc/vsftpd/vsftpd.conf Settings for #修改 vsftpd
%service sshd Start # Start SSHService
%chkconfig sshd on # set SSH service to start by default
7. Procedures
%RPM-QA # View all installed packages Red Hat package Manager (RPM, which functions like Add/Remove operations under Windows)
%RPM-QF < file name > # See which package the file belongs to (-QF: Display query information in the specified way)
8. View memory and CPU usage
%topas # IBM, SUN, Ibm-aix
%vmstat # SUN
%top # HP
%sar-d Ten -# Observe system IO and CPU occupied commands, System IO
%sar-u Ten -# Observe the system IO and CPU occupied commands, CPU
%ONSTAT-D # Informix observation of Tempdbs occupancy
10. Shared Memory Operations%IPCS-M # Output information about shared memory
%IPCS-Q # Output information about information queues (message queue)
%ipcs-s # Output information about the "breaker" (semaphore)
%ipcrm-m 0x00000000# Delete Shared memory
Linux command notes