Ubuntu查看版本信息

前言: 在安装某些软件时需要填写linux系统的版本信息,如安装docker, 这时需要查看linux的版本信息可使用下面几种方式.

  1. lsb_release -c 或者 lsb_release -cs
root@VM-16-14-ubuntu ~# lsb_release -c
Codename:       bionic
root@VM-16-14-ubuntu ~# lsb_release -cs
bionic
  1. cat /etc/issue
root@VM-16-14-ubuntu ~# cat /etc/issue
Ubuntu 18.04.1 LTS \n \l
  1. cat /etc/lsb-release
root@VM-16-14-ubuntu ~# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"
  1. cat /etc/os-release
root@VM-16-14-ubuntu ~# cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.1 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.1 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

你可能感兴趣的:(Ubuntu查看版本信息)