Linux命令 查看Linux版本和是否联网
1.查看Linux内核版本
1.1 $ cat /proc/version
[heima01@heima01 ~]$ cat /proc/version
Linux version 2.6.32-573.el6.i686 (mockbuild@c6b9.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC) ) #1 SMP Thu Jul 23 12:37:35 UTC 2015 [root@frxx ~]# cat /proc/version
Linux version 3.10.0-957.1.3.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) ) #1 SMP Thu Nov 29 14:49:43 UTC 2018 1.2 $ uname -a
解释:x86_64表示Linux是64位版本的,i686 i386表示是32位版本的。
[heima01@heima01 ~]$ uname -a
Linux heima01 2.6.32-573.el6.i686 #1 SMP Thu Jul 23 12:37:35 UTC 2015 i686 i686 i386 GNU/Linux [root@frxx ~]# uname -a
Linux frxx 3.10.0-957.1.3.el7.x86_64 #1 SMP Thu Nov 29 14:49:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux 1.3 $ uname -r
[heima01@heima01 ~]$ uname -r
2.6.32-573.el6.i686 [root@frxx ~]# uname -r
3.10.0-957.1.3.el7.x86_64 2.查看Linux发行版本
2.1 $ lsb_release -a
[heima01@heima01 ~]$ lsb_release -a
LSB Version: :base-4.0-ia32:base-4.0-noarch:core-4.0-ia32:core-4.0-noarch:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.7 (Final)
Release: 6.7
Codename: Final 2.2 $ cat /etc/issue
[heima01@heima01 ~]$ cat /etc/issue
CentOS release 6.7 (Final)
Kernel \r on an \m 2.3 $ cat /etc/redhat-release
$ cat /etc/*release*
[heima01@heima01 ~]$ cat /etc/redhat-release
CentOS release 6.7 (Final) [heima01@heima01 ~]$ cat /etc/*release*
CentOS release 6.7 (Final)
LSB_VERSION=base-4.0-ia32:base-4.0-noarch:core-4.0-ia32:core-4.0-noarch:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-ia32:printing-4.0-noarch
cat: /etc/lsb-release.d: Is a directory
CentOS release 6.7 (Final)
CentOS release 6.7 (Final)
cpe:/o:centos:linux:6:GA
2.4 $ rpm -qi centos-release
[root@localhost ~]# rpm -qi centos-release
Name : centos-release
Version : 7
Release : 5.1804.el7.centos
Architecture: x86_64
Install Date: Wed 17 Jul 2019 05:33:06 PM CST
Group : System Environment/Base
Size : 40173
License : GPLv2
Signature : RSA/SHA256, Tue 01 May 2018 12:17:56 AM CST, Key ID 24c6a8a7f4a80eb5
Source RPM : centos-release-7-5.1804.el7.centos.src.rpm
Build Date : Sun 29 Apr 2018 12:35:55 AM CST
Build Host : x86-01.bsys.centos.org
Relocations : (not relocatable)
Packager : CentOS BuildSystem <http://bugs.centos.org>
Vendor : CentOS
Summary : CentOS Linux release file
Description :
CentOS Linux release files
3.查看是否联网
$ ping www.baidu.com
使用:
因为使用yum工具安装软件可能需要网络。 1.没有联网
[heima01@heima01 ~]$ ping www.baidu.com
PING www.a.shifen.com (182.61.200.6) 56(84) bytes of data.
^Z
[2]+ Stopped ping www.baidu.com
2.已经联网
[root@instance-fjii60o3 ~]# ping www.baidu.com
PING www.a.shifen.com (220.181.38.150) 56(84) bytes of data.
64 bytes from 220.181.38.150 (220.181.38.150): icmp_seq=1 ttl=53 time=3.69 ms
64 bytes from 220.181.38.150 (220.181.38.150): icmp_seq=2 ttl=53 time=3.50 ms
64 bytes from 220.181.38.150 (220.181.38.150): icmp_seq=3 ttl=53 time=3.66 ms 4.查看CPU信息
# cat /proc/cpuinfo [root@frxx ~]# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 85
model name : Intel(R) Xeon(R) Gold 6148 CPU @ 2.40GHz
stepping : 4
microcode : 0x1
cpu MHz : 2399.996
cache size : 28160 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch ibrs ibpb fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f rdseed adx smap clflushopt clwb avx512cd xsaveopt xsavec xgetbv1 arat spec_ctrl
bogomips : 4799.99
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management: [root@heima01 heima01]# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 158
model name : Intel(R) Core(TM) i5-7300HQ CPU @ 2.50GHz
stepping : 9
microcode : 142
cpu MHz : 2496.002
cache size : 6144 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 22
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss nx pdpe1gb rdtscp lm constant_tsc up arch_perfmon xtopology tsc_reliable nonstop_tsc unfair_spinlock pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch arat xsaveopt fsgsbase bmi1 avx2 smep bmi2 invpcid rdseed adx
bogomips : 4992.00
clflush size : 64
cache_alignment : 64
address sizes : 43 bits physical, 48 bits virtual
power management: 5.查看Linux操作系统位数
$ getconf LONG_BIT [heima01@heima01 ~]$ getconf LONG_BIT
32
[root@frxx ~]# getconf LONG_BIT
64
Linux命令 查看Linux版本和是否联网的更多相关文章
- [Linux命令]查看Linux系统相关命令
#查看系统内核/操作系统/CPU信息 uname -a #返回:内核名 主机名 Linux内核版本 内核编译日期 操作系统版本 CPU型号 硬件平台 GNU/Linux#查看系统是32位还是64位un ...
- Linux命令 -- 查看系统版本的各种方法
适用于CentOS
- 如何用linux命令查看nginx是否在正常运行
有时想知道nigix是否在正常运行,需要用linux命令查看nginx运行情况. 执行命令: ps -A | grep nginx 如果返回结果的话,说明有nginx在运行,服务已经启动. 如果 ...
- linux服务器查看redis版本:
linux服务器查看redis版本:redis-server-v
- 20个Linux命令及Linux终端的趣事
20个Linux命令及Linux终端的趣事 . 命令:sl (蒸汽机车) 你可能了解 ‘ls’ 命令,并经常使用它来查看文件夹的内容.但是,有些时候你可能会拼写成 ‘sl’ ,这时我们应该如何获得一些 ...
- Linux系统查看系统版本命令
以下操作在centos系统上实现,有些方式可能只适用centos/redhat版本系统 uname -a |uname -r查看内核版本信息 [root@node1 ~]# uname -a Linu ...
- linux上查看系统内核版本命令(转载)
uname -a uname -r 查看发行版本信息: 在RedHat系统里,存在一个/etc/redhat-release文件,里面保存了发行版的版本信息 $cat /etc/redhat-rele ...
- Linux中查看jdk版本
linux查看java jdk安装路径和设置环境变量 windows: set java_home:查看JDK安装路径 java -version:查看JDK版本 linux: whereis jav ...
- 在linux下查看内核版本、gcc版本、操作系统多少位等参数
1. 查看linux版本 cat /etc/issue Ubuntu 11.04 \n \l 2. 查看内核版本 1)cat /proc/version Linux version 2.6.38-13 ...
随机推荐
- 51nod 1610
题目 神犇题解 所以说鄙人的姿势水平完全不够啊OTZ. 很naive的想法是O(T*v*m)的,据说卡一卡可以过去.题目要求的东西其实是这个: $ \sum\limits_{i = 1}^v {\mu ...
- Es6 学习笔记(一)数组扩展
扩展运算符 ... 1.数组的扩展运算符将一个数组转换成一个逗号分隔的参数序列 console.log(...[1,2,3]) //1,2,3 ['a', 'b',...[1,3]] //a, ...
- kvm初体验之七:attach usb storage device to a VM
1. virsh attach-disk vm1 /dev/sdb sdc 将host上的/dev/sdb挂载到vm1的/dev/sdc上 2. virsh detach-disk vm1 sdc 将 ...
- python学习笔记:第五天( 字典)
Python3 字典 字典是另一种可变容器模型,且可存储任意类型对象. 字典的每个键值(key=>value)对用冒号(:)分割,每个对之间用逗号(,)分割,整个字典包括在花括号({})中 ,格 ...
- EmbarassedBird网站需求规格说明书
网站概述 一个特别的在线问答游戏 用户环境 小屏手机, 中等屏幕平板电脑, 大屏显示器 使用chrome浏览器将有全部功能, 其他浏览器完备的基本功能 编程语言&开发环境 HTML/CSS/J ...
- next enum in swift
enum Iter: Int{ case s1=0, s2, s3, s4 mutating func next(){ if self == .s4 { self = .s1 return } sel ...
- 数据可视化入门之show me the numbers
数据的可视化一直是自己瞎玩着学,近来想系统的学数据可视化的东西,于是搜索资料时看到有人推荐<show me the numbers>作为入门. 由于搜不到具体的书籍内容,只能 ...
- javaScript的类型转换
1.javaScript会自动跟据期望将值进行转换,比如 2.下面表列出了一些javaScript的自动转换,其中粗体字表示了出乎意料的转换情况 3.显示的类型转换 尽管类型可以自动进行一些转换,但是 ...
- C++ STL std::wstring_convert处理UTF8
#include <iostream> #include <string> #include <locale> #include <codecvt> # ...
- dataguard 常规运维操作
1.standby database 正常的打开与关闭 1.1 针对 physical standby打开:--打开数据库SQL>startup; -- 开启 mgr 进程 SQL>ALT ...