是否查看linux 中文版,Linux命令 查看Linux版本和是否联网

jia.gif

jian.gif

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版本和是否联网

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值