收集系统信息(hostname、uname)

一 hostname:显示和设置系统主机的名。

(1)选项:

*-a:显示主机的别名。

*-i:显示指定主机的ID地址。


二 uname:print system information。

*-a:print all information.

*-s:print kernel name.

*-v:print the kernel version.


三 综合:

(1)打印出CPU相关信息:

cat /proc/cpuinfo

第五行为cpu的名称:cat /proc/cpuinfo | head -n 5 | tail -1


(2)打印内存的详细信息:

cat /proc/meminfo


(3)打印系统分区信息:

cat /proc/partitions

或fdisk命令。


(4)获取系统的详细信息:

lshw:lshw is a small tool to extract detailed information on the hardware configuration of the machine.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值