linux内核版本和发行版本的区别:
Linux内核是Linux操作系统创始人主持的网站 www.kernel.org 上发布的操作系统的最基本的那些东西。
Linux发行版则是前述那些东西的基础上添加了一些工具软件的基础上构成的一套庞大复杂的操作系统。虽然内核都是一样的,但添加部分各不相同,这就构成了不同的发行版本。
Linux本身指的是一个操作系统内核,只有内核是无法直接使用的。我们需要的,可以使用的操作系统是一个包含了内核和一批有用的程序的的一个集合体,这个就是Linux发行版。
其中,Ubuntu。RedHat就是Linux的不同的发行版。
转自https://blog.csdn.net/llee84/article/details/80533191
linux内核版本查看方法:因为我们公司限制了某些命令以及文件查看权限,所以我这里就用了uname -a
以下两条命令适合所有 Linux
系统。
1、cat /proc/version
复制
1 2 3 4 5 | $ cat /proc/version Linux version 3.10.0-327.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC) ) #1 SMP Thu Nov 19 22:10:57 UTC 2015 ➜ ~ cat /proc/version Linux version 4.4.0-36-generic (buildd@lcy01-01) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.2) ) #55-Ubuntu SMP Thu Aug 11 18:01:55 UTC 2016 |
2、uname -a
复制
1 2 3 4 5 | $ uname -a Linux centos 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux ➜ ~ uname -a Linux www 4.4.0-36-generic #55-Ubuntu SMP Thu Aug 11 18:01:55 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux |
linux发行版本查看方法:这里我就用cat /etc/redhat-release强行蒙了一波,结果还真有,所以就使用的redhat被
1、lsb_release -a
复制
1 2 3 4 5 6 7 8 9 10 11 12 13 | $ lsb_release -a LSB Version: :core-4.1-amd64:core-4.1-noarch Distributor ID: CentOS Description: CentOS Linux release 7.2.1511 (Core) Release: 7.2.1511 Codename: Core ➜ ~ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.1 LTS Release: 16.04 Codename: xenial |
这个命令适用于所有的 Linux
发行版,包括 Redhat
、SuSE
、Debian…
等发行版。
有的系统中默认并没有安装 lsb_release
,需要安装。下面介绍一下 CentOS
系统中安装方法。
首先查找 lsb_release
安装包:
复制
1 2 3 4 5 6 7 8 9 10 | $ yum provides lsb_release 已加载插件:fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.btte.net * extras: mirrors.btte.net * updates: mirrors.btte.net redhat-lsb-core-4.1-27.el7.centos.1.i686 : LSB Core module support 源 :base 匹配来源: 文件名 :/usr/bin/lsb_release |
安装:
复制
1 | $ sudo yum install -y redhat-lsb-core |
2、cat /etc/redhat-release
这种方法只适合查看 Redhat
系的 Linux
,如:CentOS
。
复制
1 2 | $ cat /etc/redhat-release CentOS Linux release 7.2.1511 (Core) |
3、cat /etc/issue
此命令适用于所有的 Linux
发行版。
复制
1 2 | ➜ ~ cat /etc/issue Ubuntu 16.04.1 LTS \n \l |
查看springboot版本以及内置tomcat版本,这里我用的pom文件看的springboot版本,当然你用springboot搭建项目之初就能看自己用的是什么springboot版本
以下转自https://blog.csdn.net/qq_38584262/article/details/85336641
1、追根溯源,需要到建立项目之初
2、点击Default:https://start.spring .io,出现以下界面:
我看的是pom文件。。。。
然后拿着这个版本号看网址 https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-tomcat/1.5.6.RELEASE
就是这里了