加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

Linux命令 查看Linux版本和是否联网

发布时间:2020-12-14 00:57:54 所属栏目:Linux 来源:网络整理
导读:1.查看Linux内核版本1.1 $ cat /proc/version[[email?protected] ~]$ cat /proc/versionLinux version 2.6.32-573.el6.i686 ([email?protected]) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC) ) #1 SMP Thu Jul 23 12:37:35 UTC 20151.2 $ uname -

1.查看Linux内核版本
	1.1 $ cat /proc/version
[[email?protected] ~]$ cat /proc/version
Linux version 2.6.32-573.el6.i686 ([email?protected]) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC) ) #1 SMP Thu Jul 23 12:37:35 UTC 2015

	1.2 $ uname -a
[[email?protected] ~]$ 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

	1.3 $ uname -r
[[email?protected] ~]$ uname -r
2.6.32-573.el6.i686

2.查看Linux发行版本
	2.1 $ lsb_release -a
[[email?protected] ~]$ 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
[[email?protected] ~]$ cat /etc/issue
CentOS release 6.7 (Final)
Kernel r on an m

	2.3 $ cat /etc/redhat-release
		$ cat /etc/*release*
[[email?protected] ~]$ cat /etc/redhat-release
CentOS release 6.7 (Final)

[[email?protected] ~]$ 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

3.查看是否联网
	$ ping www.baidu.com
使用:
	因为使用yum工具安装软件可能需要网络。


	1.没有联网
[[email?protected] ~]$ 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.已经联网
[[email?protected] ~]# 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
查看Linux版本和是否联网

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读