Home> php教程> PHP开发> body text

LINUX view hardware configuration commands

高洛峰
Release: 2016-12-01 13:24:47
Original
1122 people have browsed it

System

uname -a # View kernel/operating system/CPU information

cat /etc/issue # View operating system 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 variables

resources

free -m # View memory usage and swapping Area usage

df -h # Check the usage of each partition

du -sh # Check the size of the specified directory

grep MemTotal /proc/meminfo # Check the total memory

grep MemFree /proc /meminfo # Check the amount of free memory

uptime # Check the system running time, number of users, and load

cat /proc/loadavg # View system load

disks and partitions

mount | column -t # View attached partition status

fdisk -l # View all partitions www.2cto.com

swapon -s # View All swap partitions

hdparm -i /dev/hda # View disk parameters (only applicable to IDE devices)

dmesg | grep IDE # View the IDE device detection status at startup

Network

ifconfig # View the 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 # Display process status in real time

User

w # View active users

id # 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 groups of the system

crontab -l # View the current user’s scheduled tasks

services

chkconfig --list # List all system services

chkconfig --list | grep on # List all started system services

Programs

rpm -qa # View all installed software packages

Common commands are organized as follows:

Check the serial number of the motherboard: dmidecode | grep -i 'serial number'

View CPU information: cat /proc/cpuinfo or dmesg | grep -i 'cpu' or dmidecode -t processor

View memory information: cat /proc/meminfo [free -m][vmstat]

View board information: cat /proc/pci

View graphics card/sound card information: lspci |grep -i 'VGA'[dmesg | grep -i 'VGA']

View network card information: dmesg | grep -i 'eth'[cat /etc/sysconfig/hwconf | grep -i eth][lspci | grep -i 'eth']

View PCI information: lspci (more intuitive than cat /proc/pci)

View USB devices: cat /proc/bus/usb/devices

View keyboard and mouse: cat /proc/bus/input/devices

View system hard disk information and Usage: fdisk & disk – l & df

View the interrupt request (IRQ) of each device: cat /proc/interrupts

View the system architecture: uname -a


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!