当前位置: 首页 > linux命令 >

linux查看cpu型号、内核数、32位还是64位


1. 查看cpu型号、内核数:

 
[root@shoubashou ~]# less /proc/cpuinfo | grep "model name"
model name : Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz
model name : Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz
model name : Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz
model name : Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz
 
[root@shoubashou ~]# grep "model name" /proc/cpuinfo
model name : Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz
model name : Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz
model name : Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz
model name : Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz

 

2. 查看cpu是32位还是64位

 
[root@shoubashou ~]# uname -a
Linux 912616.cn 3.10.0-123.el7.x86_64 #1 SMP Mon May 5 11:16:57 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux
[root@shoubashou ~]# echo $HOSTTYPE
x86_64
[root@shoubashou ~]# getconf LONG_BIT
64
[root@shoubashou ~]# file /bin/ls
/bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.
6.32, BuildID[sha1]=0x7dc964034aa8ec7327b3992e3239a0f50789a3dd, stripped
 
# 有些版本也可以通过file /sbin/init查看

------分隔线----------------------------
  • 收藏
  • 挑错
  • 推荐
  • 打印