linux记录

有用的网址:

linux系统依赖下载命令:

如何查看linux系统是Centos还是ubuntu 还是Alpine

 - lsb_release -a 
 	-如果not found,执行:yum -y install redhat-lsb*
 - 	1、cat /etc/issue
	CentOS release 6.9 (Final)  Kernel \r on an \m (\l)    >>  centos
	ubuntu  				 >> ubuntu
	Welcome to Alpine Linux 3.14  Kernel \r on an \m (\l)   >> Alpine Linux
	2、查看逻辑cpu的个数
	cat /proc/cpuinfo | grep "processor" |wc -l
	注意:一般我们说服务器是几核CPU说的是逻辑CPU个数。
	3、查看cpu是几核
	cat /proc/cpuinfo | grep "cores"|uniq
	4、查看物理cpu个数
	cat /proc/cpuinfo | grep "physical id" | sort | uniq|wc -l

Debian下如何查看版本信息, 包括位数、版本信息以及CPU内核信息、CPU具体型号等等,整个CPU信息一目了然。

1、uname -a(Debian查看版本当前操作系统内核信息)
  Linux debian64 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u3 (2016-01-17) x86_64 GNU/Linux
2、sudo cat /proc/version(Debian查看当前操作系统版本信息)
  Linux version 3.16.0-4-amd64 (debian-kernel@lists.debian.org) (gcc version 4.8.4 (Debian 4.8.4-1) ) #1 SMP     Debian 3.16.7-ckt20-1+deb8u3 (2016-01-17)
3、cat /etc/issue
  Debian GNU/Linux 8 \n \l
4、cat /etc/os-release(Debian查看版本当前操作系统发行版信息(prints certain LSB (Linux Standard Base) and Distribution information.)。有了这个命令就可以清楚的知道到底是RedHat的、还是别的发行版,还有具体的版本号,比如3.4还是5.4等等。有些系 统上不一定安装了这个命令,可以通过查看/etc/issue文件得到发行版信息。)
  PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
  NAME="Debian GNU/Linux"
  VERSION_ID="8"
  VERSION="8 (jessie)"
  ID=debian
  HOME_URL="http://www.debian.org/"
  SUPPORT_URL="http://www.debian.org/support"
  BUG_REPORT_URL="https://bugs.debian.org/"
5、cat /proc/cpuinfo(Linux查看cpu相关信息,包括型号、主频、内核信息等)
  cpu family : 6
  model : 60
  model name : Intel(R) Core(TM) i5-4460 CPU @ 3.20GHz
 ……
6、getconf LONG_BIT(Debian查看版本说明当前CPU运行在32bit模式下, 但不代表CPU不支持64bit)
  64
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值