查看操作系统 lsb_release -a | cat /etc/redhat-release | cat /etc/issue
- [root@tc6000 EVM_combine]# cat /proc/version
- Linux version 2.6.32-642.el6.x86_64 (mockbuild@worker1.bsys.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-17) (GCC) ) #1 SMP Tue May 10 17:27:01 UTC 2016
- [root@tc6000 EVM_combine]# uname -a
- Linux tc6000 2.6.32-642.el6.x86_64 #1 SMP Tue May 10 17:27:01 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
- #cat /proc/version 和uname -a 均可以查看到内核版本为2.6.32-642.el6.x86_64
- #2.6.32 代表版本号 -642代表版本号
- #el6 代表 发行版版本标识,RHEL6CentOS6Oracle Linux6 一般都是el6
- #x86_64 代表64位系统 一般i386代表是32位
- [root@tc6000 EVM_combine]# 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.8 (Final)
- Release: 6.8
- Codename: Final
- [root@tc6000 EVM_combine]# cat /etc/redhat-release
- CentOS release 6.8 (Final)
- [root@tc6000 EVM_combine]# cat /etc/issue
- CentOS release 6.8 (Final)
- Kernel r on an m
- #lsb_release -a cat /etc/redhat-release cat /etc/issue 三个命令都得到操作系统是CentOS, 但这三个命令并不适用每台linux机器
这里块命令比较多,注解就写在代码中。 【编辑推荐】 - 【干货】13 个最好用的免费服务器和网络监控工具
- 你知道我们上网是怎么连到服务器的吗?看看DNS是怎么工作的
- Linux下使用IPIP隧道将额外的IP地址映射给其他服务器使用
- 如何实现两台服务器间无密码的传输数据和操作
- 服务器装什么操作系统更好?常见的有这些!
【责任编辑:武晓燕 TEL:(010)68476606】
点赞 0 (编辑:晋中站长网)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|