Detecting new hardware with hardware detection program Kuduz: Service kudzu start (or restart)
View CPU Information: Cat/proc/cpuinfo
View card information: CAT/PROC/PCI
View PCI information: LSPCI (more intuitive than CAT/PROC/PCI)
View memory Information: Cat/proc/meminfo
View USB devices: Cat/proc/bus/usb/devices
Viewing the keyboard and mouse: Cat/proc/bus/input/devices
View system hard disk information and usage: Fdisk & disk–l & DF
To view interrupt requests (IRQ) for each device: cat/proc/interrupts
View boot Hardware detection infolog: DMESG MORE/VAR/LOG/DMESG
System
# 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 of loaded kernel modules
# env # View Environment variables
Resources
# free-m # View memory usage and swap area usage
# df-h # View the usage of each partition
# du-sh # View the size of the specified directory
# grep Memtotal/proc/meminfo # View Total Memory
# grep Memfree/proc/meminfo # View the amount of free memory
# uptime # View System uptime, number of users, load
# cat/proc/loadavg # View System load
"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 | grep IDE # View IDE device detection status at startup
Network
# ifconfig # View the properties of all network interfaces
# iptables-l # View firewall settings
# route-n # View the 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
User
# w # View active Users
# ID # view specified user information
# last # View user log in 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
# useradd Centospub # Create a user named Centospub
# passwd Centospub # Set password for user centospub
# userdel-r Centospub # Delete a user named Centospub general user
Service
# chkconfig–list # List all system services
# Chkconfig–list | grep on # Lists all startup system services
# service sshd Start # Startup services
# service sshd Stop # Stop Services
# service sshd Restart # Restart Services
Program
# rpm-qa # View all installed Packages
"Linux Query directory usage space"
# du-sh dirname View directory usage space
-S displays totals only
-H with K, M, G as the unit, improve the readability of information. KB, MB, GB are converted in 1024 units, and-H is converted to 1000 units
-A: Displays the disk space occupied by all directories and each file in the second directory
-B: Size is represented by bytes (default value is k bytes)
-C: Last plus total (preset)
-L: Calculate all file sizes
-X: Only files that belong to the same file system are counted
-L: Calculate all file sizes
"SSH terminal Chinese garbled"
[Email protected] ~]# vi/etc/sysconfig/i18n
Lang= "ZH_CN. Gb18030″
Language= "Zh_CN.GB18030:zh_CN.GB2312:zh_CN"
Supported= "ZH_CN. Utf-8:zh_cn:zh:en_us. Utf-8:en_us:en "
Sysfont= "Latarcyrheb-sun16″
"When the firewall is turned on, do the following to open the relevant port"
Modify the/etc/sysconfig/iptables file to add the following:
-A rh-firewall-1-input-m state–state new-m tcp-p tcp–dport 80-j ACCEPT
-A rh-firewall-1-input-m state–state new-m tcp-p tcp–dport 22-j ACCEPT
Linux (CentOS) daily operations commands