方法
Linux下查阅版本的方法有多种。
uname
$ uname -a
Linux ubuntu-server-vm 3.13.0-32-generic #57~precise1-Ubuntu SMP Tue Jul 15 03:50:54 UTC 2014 i686 i686 i386 GNU/Linux
$ cat /proc/version
Linux version 3.13.0-32-generic (buildd@toyol) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #57~precise1-Ubuntu SMP Tue Jul 15 03:50:54 UTC 2014
$ cat /etc/issue
Ubuntu 12.04.5 LTS \n \l
Ubuntu 12.04
$ uname -a
Linux raspberrypi 3.10.25+ #622 PREEMPT Fri Jan 3 18:41:00 GMT 2014 armv6l GNU/Linux
$ cat /proc/version
Linux version 3.10.25+ (dc4@dc4-arm-01) (gcc version 4.7.2 20120731 (prerelease) (crosstool-NG linaro-1.13.1+bzr2458 - Linaro GCC 2012.08) ) #622 PREEMPT Fri Jan 3 18:41:00 GMT 2014
$ cat /etc/issue
Raspbian GNU/Linux 7 \n \l
接下来要观察Ubuntu 12/14/15/16各自的内核版本都使用了那个版本的USB子系统。
Ubuntu
allankliu@ubuntu:~$ uname -a
Linux ubuntu 4.4.0-31-generic #50~14.04.1-Ubuntu SMP Wed Jul 13 01:07:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
allankliu@ubuntu:~$ cat /proc/version
Linux version 4.4.0-31-generic (buildd@lgw01-43) (gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) ) #50~14.04.1-Ubuntu SMP Wed Jul 13 01:07:32 UTC 2016
allankliu@ubuntu:~$ cat /etc/issue
Ubuntu 14.04.5 LTS \n \l
allankliu@ubuntu-VirtualBox:~$ uname -a
Linux ubuntu-VirtualBox 3.19.0-15-generic #50~15-Ubuntu SMP Thu Apr 16 23:32:37 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
allankliu@ubuntu-VirtualBox:~$ cat /proc/version
Linux version 3.19.0-15-generic (buildd@komainu) (gcc version 4.9.2 (Ubuntu 4.9.2-10ubuntu13) ) #15-Ubuntu SMP Thu Apr 16 23:32:37 UTC 2015
allankliu@ubuntu-VirtualBox:~$ cat /etc/issue
Ubuntu 15.04 LTS \n \l
ubuntu-kylin@ubuntu-kylin:~$ uname -a
Linux ubuntu-kylin 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
ubuntu-kylin@ubuntu-kylin:~$ cat /proc/version
Linux version 4.4.0-21-generic (buildd@lgw01-21) (gcc version 5.3.1 20160413 (Ubuntu 5.3.1-14ubuntu2) ) #37-Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016
ubuntu-kylin@ubuntu-kylin:~$ cat /etc/issue
忽然发现Ubuntu 15.04/16.04的内核版本居然比14.04还要低,为什么?都是x64配置,为何内核版本是降级的?
而且我的STM32F103C8 CDC居然在14.04工作不正常,但是15.04/16.04却是工作正常的?
网友评论