linux下系统信息查看

一、查看版本信息

1、使用uname命令

~ uname -rm
4.15.0-72-generic x86_64

-rm参数的意思如下:
-r, --kernel-release: print the kernel release
-m, --machine: print the machine hardware name

2、查看/proc/version文件

使用指令cat /proc/cpuinfo

~ cat /proc/version 
Linux version 4.15.0-72-generic (buildd@lcy01-amd64-023) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.12)) #81~16.04.1-Ubuntu SMP Tue Nov 26 16:34:21 UTC 2019

二、查看CPU信息

通过查看 /proc/cpuinfo文件查看CPU信息,使用指令cat /proc/cpuinfo

通过该文件可以查看CPU类型、核数以及大小,processor代表处理器编号,model name显示处理器型号与主频

~ cat /proc/cpuinfo 
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 60
model name	: Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
stepping	: 3
microcode	: 0x19
cpu MHz		: 4000.019
cache size	: 8192 KB
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 2
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm cpuid_fault invpcid_single pti fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid xsaveopt arat
bugs		: cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips	: 8000.03
......

如果只看CPU型号与频率,可以通过grep指令过滤一下,如:

~ cat /proc/cpuinfo | grep "model name"
model name	: Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
model name	: Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz

三、查看内存信息

通过查看/proc/meminfo 查看内存,总容量、剩余容量、可使用大小等

~ cat /proc/meminfo 
MemTotal:        3050084 kB
MemFree:          266908 kB
MemAvailable:    1030264 kB
Buffers:          108572 kB
Cached:           707876 kB
SwapCached:          232 kB
Active:          1815884 kB
Inactive:         648856 kB
Active(anon):    1404508 kB
Inactive(anon):   249552 kB
Active(file):     411376 kB
Inactive(file):   399304 kB

四、查看网络信息

使用指令ifconfig

通过该指令可以查看到网卡、MAC地址、IP地址、广播地址等信息

~ ifconfig
ens33     Link encap:Ethernet  HWaddr 00:0c:29:ae:df:2a  
          inet addr:192.168.0.103  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::c2cb:6103:fd17:45ba/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4750 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3627 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3623810 (3.6 MB)  TX bytes:382380 (382.3 KB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:677 errors:0 dropped:0 overruns:0 frame:0
          TX packets:677 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:69811 (69.8 KB)  TX bytes:69811 (69.8 KB)

五、查看软连接

通过ls -l指令查看

箭头指向的就是文件实际地址箭头指向的就是实际地址

六、查看系统进程资源占用情况

使用top指令,可以查看进程的运行信息以及CPU的占用率与内存使用情况,如下
在这里插入图片描述

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

东皇※太一

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值