折腾:
【未解决】Ubuntu中mysql有时候会突然挂掉
期间,需要去搞清楚,当前Ubuntu的版本是多少。
其实之前通过ssh登录后显示的:
1 2 3 4 5 | Welcome to Ubuntu 16.04.1 LTS (GNU /Linux 4.4.0-53-generic x86_64) * Documentation: https: //help .ubuntu.com * Management: https: //landscape .canonical.com * Support: https: //ubuntu .com /advantage ... |
已经看到了:
16.04.1 LTS
不过还是想要搞清楚如何查到确切的Ubuntu的发行版的版本号。
ubuntu 查看版本
【总结】
查看Ubuntu的版本号的最佳办法:
1 | lsb_release -a |
输出:
1 2 3 4 5 | No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.1 LTS Release: 16.04 Codename: xenial |
其中的:
- Ubuntu 16.04.1 LTS
- 版本号:16.04.1
- LTS=Long Time Support
- 长期支持的版本
【其他可选方法】
(1)
1 | cat /etc/issue |
输出
1 | Ubuntu 16.04.1 LTS \n \l |
中的:
Ubuntu 16.04.1 LTS
(2)ssh登录后,会显示出:
1 2 3 4 5 6 7 | Welcome to Ubuntu 16.04.1 LTS (GNU /Linux 4.4.0-53-generic x86_64) * Documentation: https: //help .ubuntu.com * Management: https: //landscape .canonical.com * Support: https: //ubuntu .com /advantage Last login: Fri Jun 7 13:00:48 2019 from 49.64.103.48 |
中的:
Ubuntu 16.04.1 LTS
(3)
1 | cat /proc/version |
输出:
1 | Linux version 4.4.0-53-generic (buildd@lcy01-28) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) ) #74-Ubuntu SMP Fri Dec 2 15:59:10 UTC 2016 |
中的:
16.04.4
-》但是和其他看到的16.04.1,都不太一样,仅供参考。
【其他相关内容】
1 | uname -a |
输出:
1 | Linux VM-158-80-ubuntu 4.4.0-53-generic #74-Ubuntu SMP Fri Dec 2 15:59:10 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux |
中的
4.4.0-53
是Linux内核版本号。
转载请注明:在路上 » 【已解决】Ubuntu查看系统版本号