Linux硬件信息查询命令(2)
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
route -n # 查看路由表
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.56.236.0 0.0.0.0 255.255.255.128 U 0 0 0 bond0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 bond0
0.0.0.0 10.56.236.126 0.0.0.0 UG 0 0 0 bond0
netstat -lntp # 查看所有监听端口
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:2049 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:389 0.0.0.0:* LISTEN 12782/ns-slapd
# netstat -antp # 查看所有已经建立的连接
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:2049 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:389 0.0.0.0:* LISTEN 12782/ns-slapd
tcp 0 0 0.0.0.0:11111 0.0.0.0:* LISTEN 15217/ricci
netstat -s # 查看网络统计信息
Ip:
195815097 total packets received
8 forwarded
0 incoming packets discarded
195814891 incoming packets delivered
167012221 requests sent out
3 outgoing packets dropped
7 fragments dropped after timeout
231 reassemblies required
33 packets reassembled ok
7 packet reassembles failed
8 fragments received ok
32 fragments created
Icmp:
25034 ICMP messages received
16 input ICMP message failed.
ICMP input histogram:
destination unreachable: 173
echo requests: 13025
echo replies: 11836
25060 ICMP messages sent
0 ICMP messages failed
ICMP output histogram:
destination unreachable: 185
echo request: 11842
echo replies: 13025
IcmpMsg:
InType0: 11836
InType3: 173
InType8: 13025
OutType0: 13025
OutType3: 185
OutType8: 11842
OutType10: 8
进程
ps -ef # 查看所有进程
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 Jul10 ? 00:00:05 init [3]
root 2 1 0 Jul10 ? 00:00:03 [migration/0]
root 3 1 0 Jul10 ? 00:00:00 [ksoftirqd/0]
root 4 1 0 Jul10 ? 00:00:00 [watchdog/0]
top # 实时显示进程状态
Tasks: 385 total, 1 running, 384 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.2%us, 0.3%sy, 0.0%ni, 98.6%id, 0.8%wa, 0.0%hi, 0.1%si, 0.0%st
Mem: 16432172k total, 3795132k used, 12637040k free, 800952k buffers
Swap: 16777208k total, 0k used, 16777208k free, 1729708k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
7339 root 15 0 11016 1192 700 R 2.0 0.0 0:00.01 top
17378 root 10 -5 0 0 0 D 2.0 0.0 6:50.74 kjournald
1 root 15 0 10372 704 596 S 0.0 0.0 0:05.31 init
用户
w # 查看活动用户
14:33:53 up 4 days, 3:15, 1 user, load average: 1.17, 1.14, 1.10
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/0 10.141.41.62 13:11 0.00s 0.05s 0.05s -bash
id <用户名> # 查看指定用户信息
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)
last # 查看用户登录日志
root pts/0 10.141.41.62 Mon Jul 14 13:11 still logged in
root pts/0 10.141.41.62 Mon Jul 14 10:38 - 12:34 (01:56)
root pts/0 10.141.152.51 Sun Jul 13 07:14 - 11:55 (04:41)
root pts/2 10.140.2.76 Fri Jul 11 17:50 - 18:38 (00:47)
cut -d: -f1 /etc/passwd # 查看系统所有用户
# cut -d: -f1 /etc/passwd
root
bin
daemon
adm
cut -d: -f1 /etc/group # 查看系统所有组
root
bin
daemon
sys
adm
tty
disk
crontab -l # 查看当前用户的计划任务
服务
chkconfig --list # 列出所有系统服务
httpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
ip6tables 0:off 1:off 2:on 3:on 4:on 5:on 6:off
network 0:off 1:off 2:on 3:on 4:on 5:on 6:off
nfs 0:off 1:off 2:off 3:off 4:off 5:off 6:off
nfslock 0:off 1:off 2:off 3:on 4:on 5:on 6:off
nscd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
ntpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
oddjobd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
oractl 0:off 1:off 2:off 3:off 4:off 5:off 6:off
snmpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
snmptrapd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
sshd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
syslog 0:off 1:off 2:on 3:on 4:on 5:on 6:off
chkconfig –list | grep on # 列出所有启动的系统服务
程序
rpm -qa # 查看所有安装的软件包
# rpm -qa | grep perl
perl-HTML-Parser-3.55-1.fc6
perl-Net-Telnet-3.03-5
perl-LDAP-0.33-4.el5_8
perl-XML-LibXML-1.58-6
其他常用命令整理如下:
查看主板的序列号:dmidecode | grep -i 'serial number'用硬件检测程序kuduz探测新硬件:service kudzu start ( or restart)查看CPU信息:cat /procuinfo [dmesg | grep -i 'cpu'][dmidecode -t processor]查看内存信息:cat /proc/meminfo [free -m][vmstat]查看板卡信息:cat /proc/pci查看显卡/声卡信息:lspci |grep -i 'VGA'[dmesg | grep -i 'VGA']查看网卡信息:dmesg | grep -i 'eth'[cat /etc/sysconfig/hwconf | grep -i eth][lspci | grep -i 'eth']查看PCI信息:lspci (相比cat /proc/pci更直观)查看USB设备:cat /procs/usb/devices查看键盘和鼠标:cat /procs/input/devices查看系统硬盘信息和使用情况:fdisk & disk – l & df查看各设备的中断请求(IRQ):cat /proc/interrupts查看系统体系结构:uname -a查看及启动系统的32位或64位内核模式:isalist –v [isainfo –v][isainfo –b]查看硬件信息,包括bios、cpu、内存等信息:dmidecode测定当前的显示器刷新频率:/usr/sbin/ffbconfig –rev ?查看系统配置:/usr/platform4u/sbin/prtdiag –v查看当前系统中已经应用的补丁:showrev –p显示当前的运行级别:who –rH查看当前的bind版本信息:nslookup –class=chaos –q=txt version.bind查看硬件信息:dmesg | more显示外设信息, 如usb,网卡等信息:lspci查看已加载的驱动: lsnod lshw查看当前处理器的类型和速度(主频):psrinfo -v打印当前的OBP版本号:prtconf -v查看硬盘物理信息(vendor, RPM, Capacity):iostat –E查看磁盘的几何参数和分区信息:prtvtoc /dev/
以上就是系统大全给大家介绍的如何使的方法都有一定的了解了吧,好了,如果大家还想了解更多的资讯,那就赶紧点击系统大全官网吧。
本文来自系统大全http://www.win7cn.com/如需转载请注明!推荐:win7纯净版
系统下载排行榜71011xp
番茄花园 Win7 64位 快速稳定版
2【纯净之家】Windows7 64位 最新纯净版
3【老机专用】Windows7 32位 精简旗舰版
4【纯净之家】Windows7 SP1 64位 全补丁旗舰版
5JUJUMAO Win7 64位 最新纯净版
6【纯净之家】Windows7 32位 最新纯净版
7【纯净之家】Windows7 SP1 64位 办公旗舰版
8【雨林木风】Windows7 64位 装机旗舰版
9【电脑公司】Windows7 64位 免费旗舰版
10【国庆献礼】JUJUMAO Win7 SP1 64位旗舰克隆纯净版
【纯净之家】Windows10 22H2 64位 专业工作站版
2【纯净之家】Windows10 22H2 64位 游戏优化版
3【纯净之家】Windows10 企业版 LTSC 2021
4【纯净之家】Windows10企业版LTSC2021 纯净版
5【深度技术】Windows10 64位 专业精简版
6联想Lenovo Windows10 22H2 64位专业版
7JUJUMAO Win8.1 Up3 X64 极速精简版v2019.11
8【纯净之家】Windows10 22H2 64位 专业精简版
9【雨林木风】Windows10 64位 专业精简版
10【纯净之家】Windows10 22H2 64位 专业办公版
【纯净之家】Windows11 23H2 64位 游戏优化版
2【纯净之家】Windows11 23H2 64位 专业工作站版
3【纯净之家】Windows11 23H2 64位 纯净专业版
4风林火山Windows11下载中文版
5【纯净之家】Windows11 23H2 64位 最新企业版
6【纯净之家】Windows11 23H2 64位 中文家庭版
7JUJUMAO Win11 24H2 64位 专业版镜像
8深度精简 Win11 ESD 全新优化纯净版V2024
9【纯净之家】Windows11 23H2 64位专业精简版
10【纯净之家】Windows11 23H2 64位 纯净家庭版
深度技术 GHOST XP SP3 电脑专用版 V2017.03
2深度技术 GGHOST XP SP3 电脑专用版 V2017.02
3Win7系统下载 PCOS技术Ghost WinXP SP3 2017 夏季装机版
4萝卜家园 GHOST XP SP3 万能装机版 V2017.03
5番茄花园 GHOST XP SP3 极速体验版 V2017.03
6雨林木风 GHOST XP SP3 官方旗舰版 V2017.03
7电脑公司 GHOST XP SP3 经典旗舰版 V2017.03
8雨林木风GHOST XP SP3完美纯净版【V201710】已激活
9萝卜家园 GHOST XP SP3 完美装机版 V2016.10
10雨林木风 GHOST XP SP3 精英装机版 V2017.04
热门教程
装机必备 更多+
重装工具