centos 下查看硬體資訊

來源:互聯網
上載者:User

centos 下查看硬體資訊

一:使用CentOS常用命令查看cpu
more /proc/cpuinfo | grep "model name"
grep "model
name" /proc/cpuinfo

[root@localhost ~]# grep "CPU" /proc/cpuinfo
model name      : Intel(R)
Xeon(R) CPU           E5506  @ 2.13GHz
model name      : Intel(R) Xeon(R)
CPU           E5506  @ 2.13GHz
model name      : Intel(R) Xeon(R)
CPU           E5506  @ 2.13GHz
model name      : Intel(R) Xeon(R)
CPU           E5506  @ 2.13GHz
model name      : Intel(R) Xeon(R)
CPU           E5506  @ 2.13GHz
model name      : Intel(R) Xeon(R)
CPU           E5506  @ 2.13GHz
model name      : Intel(R) Xeon(R)
CPU           E5506  @ 2.13GHz
model name      : Intel(R) Xeon(R)
CPU           E5506  @ 2.13GHz
如果覺得需要看的更加舒服
grep "model name"
/proc/cpuinfo | cut -f2 -d:
二:使用CentOS常用命令查看記憶體、
grep MemTotal
/proc/meminfo
grep MemTotal /proc/meminfo | cut -f2 -d:
free -m |grep
"Mem"
三:使用CentOS常用命令查看cpu是32位還是64位
    
getconf
LONG_BIT
五:使用CentOS常用命令查看核心版本

uname -r
uname -a

六:使用CentOS常用命令查看目前時間

   date
   設定系統時間
   date -s "20110317 18:30:50" &&hwclock
--systohc
   同步系統時間
   ntpdate 210.72.145.44
   0 23 * * *
/usr/sbin/ntpdate 210.72.145.44 > /dev/null
2>&1
七:使用CentOS常用命令查看硬碟和分區
  
  
   查看分區      fdisk -l   

   看到全部佔用的空間  du -sh
   看到這個目錄的大小 du /etc
-sh
八:使用CentOS常用命令查看安裝的軟體包
    查看系統安裝的時候裝的軟體包 
   cat -n
/root/install.log
   more /root/install.log | wc -l

   查看現在已經安裝了那些軟體包
   rpm -qa
   rpm -qa | wc -l
   yum list
installed | wc -l
九:使用CentOS常用命令查看鍵盤配置 
    cat
/etc/sysconfig/keyboard
    cat /etc/sysconfig/keyboard | grep KEYTABLE | cut
-f2 -d
十:使用CentOS常用命令查看selinux情況
    sestatus | cut -f2 -d:
    cat
/etc/sysconfig/selinux
十一:使用CentOS常用命令查看ip,mac地址
      ifconfig
     
cat /etc/sysconfig/network-scripts/ifcfg-eth0 | grep IPADDR
      cat
/etc/sysconfig/network-scripts/ifcfg-eth0 | grep IPADDR | cut -f2
     
ifconfig eth0 |grep "inet addr:"
      查看網關   cat
/etc/sysconfig/network
      查看dns    cat
/etc/resolv.conf
十二:使用CentOS常用命令查看預設語言
       echo $LANG
$LANGUAGE
十二:使用CentOS常用命令查看所屬時區和是否使用UTC時間
      cat
/etc/sysconfig/clock
十三:使用CentOS常用命令查看主機名稱
      cat
/etc/sysconfig/network
十四:使用CentOS常用命令查看開機已耗用時間
      
uptime
查看主板資訊
dmidecode |more

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.