本文将带您了解关于查看Centos版本的新内容,同时我们还将为您解释查看centos版本命令的相关知识,另外,我们还将为您提供关于centos查看OS版本、centos-查看CentOS版本、Cent
本文将带您了解关于查看Centos版本的新内容,同时我们还将为您解释查看centos版本命令的相关知识,另外,我们还将为您提供关于centos 查看OS版本、centos-查看CentOS版本、CentOS查看CPU、内存、版本等系统信息、linux怎么查看是不是centos版本的实用信息。
本文目录一览:查看Centos版本(查看centos版本命令)
cat /etc/redhat-release
lsb_release -a
centos 查看OS版本
1)[root@localhost ~]# cat /proc/version
Linux version 2.6.18-194.el5 (mockbuild@builder10.centos.org) (gcc version 4.1.2 20080704 (Red Hat4.1.2-48)) #1 SMP Fri Apr 2 14:58:14 EDT 2010
2)
[root@localhost ~]# uname -a
Linux localhost.localdomain 2.6.18-194.el5 #1 SMP Fri Apr 2 14:58:14 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
3)
[root@localhost ~]# uname -r
2.6.18-194.el5
2. 查看linux版本:
1) 列出所有版本信息,
[root@localhost ~]# lsb_release -a
LSB Version: :core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32:graphics-3.1-noarch
distributor ID: CentOS
Description: CentOS release 5.5 (Final)
Release: 5.5
Codename: Final
注:这个命令适用于所有的linux,包括RedHat、SUSE、Debian等发行版。
2) 执行cat /etc/issue,例如如下:
[root@localhost ~]# cat /etc/issue
CentOS release 5.5 (Final)
Kernel r on an m
3) 执行cat /etc/redhat-release,252);">[root@localhost ~]# cat /etc/redhat-release
查看系统是64位还是32位:
1、getconf LONG_BIT or getconf WORD_BIT
[root@localhost ~]# getconf LONG_BIT
64
2、file /bin/ls
[root@localhost ~]# file /bin/ls
/bin/ls: ELF 64-bit LSB executable,AMD x86-64,version 1 (SYSV),for GNU/Linux 2.6.9,dynamically linked (uses shared libs),stripped
3、lsb_release -a
4、或者是使用查看文件的方法。
vim /ect/issue
centos-查看CentOS版本
cat /etc/issue
CentOS查看CPU、内存、版本等系统信息
CentOS查看系统信息
一:查看CPU
more /proc/cpuinfo | grep "model name"
grep "model name" /proc/cpuinfo
如果觉得需要看的更加舒服
grep "model name" /proc/cpuinfo | cut -f2 -d:
怎么样,linux的命令就要这样熟悉。
二:查看内存
grep MemTotal /proc/meminfo
grep MemTotal /proc/meminfo | cut -f2 -d:
free -m |grep "Mem" | awk ''{print $2}''
三:查看cpu是32位还是64位
查看CPU位数(32 or 64)
#getconf LONG_BIT
#echo $HOSTTYPE
#uname -a
四:查看当前linux的版本
#more /etc/RedHat-release
#cat /etc/redhat-release
五:查看内核版本
#uname -r
#uname -a
六:查看当前时间
date
七:查看硬盘和分区
df -h
fdisk -l
也可以查看分区
du -sh
可以看到全部占用的空间
du /etc -sh
可以看到这个目录的大小
八:查看安装的软件包
查看系统安装的时候装的软件包
cat -n /root/install.log
more /root/install.log | wc -l
查看现在已经安装了那些软件包
rpm -qa
rpm -qa | wc -l
yum list installed | wc -l
不过很奇怪,我通过rpm,和yum这两种方式查询的安装软件包,数量并不一样。没有找到原因。
九:查看键盘布局
cat /etc/sysconfig/keyboard
cat /etc/sysconfig/keyboard | grep KEYTABLE | cut -f2 -d=
十:查看selinux情况
sestatus
sestatus | cut -f2 -d:
cat /etc/sysconfig/selinux
十一:查看ip,mac地址
在ifcfg-eth0 文件里你可以看到mac,网关等信息。
ifconfig
cat /etc/sysconfig/network-scripts/ifcfg-eth0 | grep IPADDR
cat /etc/sysconfig/network-scripts/ifcfg-eth0 | grep IPADDR | cut -f2 -d=
ifconfig eth0 |grep "inet addr:" |awk ''{print $2}''|cut -c 6-
ifconfig | grep ''inet addr:''| grep -v ''127.0.0.1'' | cut -d: -f2 | awk ''{ print $1}''
查看网关
cat /etc/sysconfig/network
查看dns
cat /etc/resolv.conf
十二:查看默认语言
echo $LANG $LANGUAGE
cat /etc/sysconfig/i18n
十三:查看所属时区和是否使用UTC时间
cat /etc/sysconfig/clock
十四:查看主机名
hostname
cat /etc/sysconfig/network
修改主机名就是修改这个文件,同时最好也把host文件也修改
linux怎么查看是不是centos版本
方法:1、利用“cat /etc/issue”命令显示发行版本信息;2、利用“lsb_release -a”命令显示lsb和特定版本信息;3、利用“cat /etc/redhat-release”命令显示redhat linux版本信息。
本文操作环境:
linux怎么查看是不是centos版本
1、一行很简单的命令,就可以让立刻知道,是centos还是ubuntu,还是debian。
[root@test ~]#cat /etc/issue CentOS release 6.5 (Final) Kernel \r on an \m BashCopy
2、登录到服务器执行 lsb_release -a 即可列出所有版本信息
LSB是Linux Standard Base的缩写,lsb_release命令用来显示LSB和特定版本的相关信息。
如下:
[root@test ~]# lsb_release -a LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch Distributor ID: CentOS Description: CentOS release 6.5 (Final) Release: 6.5 Codename: Final BashCopy
注: 这个命令适用于所有的linux,包括Redhat、SuSE、Debian等发行版。
3、登录到linux执行 cat /etc/redhat-release
[root@test ~]# cat /etc/redhat-release CentOS release 6.5 (Final) BashCopy
注:这种方式下可以直接看到具体的版本号,比如 AS4 Update 1。 只对 Redhat Linux有效!
推荐教程:《centos教程》
以上就是linux怎么查看是不是
今天关于查看Centos版本和查看centos版本命令的讲解已经结束,谢谢您的阅读,如果想了解更多关于centos 查看OS版本、centos-查看CentOS版本、CentOS查看CPU、内存、版本等系统信息、linux怎么查看是不是centos版本的相关知识,请在本站搜索。
本文标签: