当前位置: 移动技术网 > 科技>操作系统>Linux > Linux—系统管理

Linux—系统管理

2019年11月09日  | 移动技术网科技  | 我要评论

查看系统版本

centos系统

# centos7查看命令
[root@localhost ~]# cat /etc/os-release

# centos6/7通用命令
[root@localhost ~]# cat /etc/redhat-release
[root@localhost ~]# cat /etc/redhat-release | sed -r 's/.* ([0-9]+)\..*/\1/'

# centos6/7通用命令
[root@localhost ~]# cat /etc/centos-release
[root@localhost ~]# cat /etc/centos-release | sed -r 's/.* ([0-9]+)\..*/\1/'

# centos6/7通用命令
[root@localhost ~]# rpm -q centos-release
[root@localhost ~]# rpm -q centos-release | cut -d- -f3

# radhat或centos存在/etc/redhat-release这个文件。【命令 cat /etc/redhat-release】

ubuntu系统

ubuntu@vm-0-9-ubuntu:~$ lsb_release -a
 
ubuntu@vm-0-9-ubuntu:~$ cat /etc/os-release
 
ubuntu@vm-0-9-ubuntu:~$ cat /etc/issue
ubuntu@vm-0-9-ubuntu:~$ less /etc/issue

# ubuntu存在 : /etc/lsb-release 这个文件 【命令 cat /etc/lsb-release】

查看linux内核版本

[root@localhost ~]# cat /proc/version

[root@localhost ~]# uname -a

  

  

 

  

 

 

  

 

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网