首页 > 解决方案 > 为什么我不能在 ubuntu 上运行没有 -a 参数的 lsb_release?

问题描述

为什么我不能在 ubuntu 上运行没有 -a 参数的 lsb_release?因为当我运行 lsb_release 命令时,我收到消息“没有可用的 LSB 模块”。

标签: linux

解决方案


说明: lsb_release命令 -打印机器上的 linux 发行版本。

解决方案:(-v版本)在没有参数的情况下是默认的。对于观看 linux 发行版的完整信息,请始终使用-a标志或-r版本号。

例子

$lsb_release -a

#output:
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.5 LTS
Release:    18.04
Codename:   bionic

$lsb_release -r

#output:
Release:    18.04

标志是:

       -v, --version
              Show the version of the LSB against which your current installation is compliant.  The version is expressed as a colon separated list of LSB module descriptions.

       -i, --id
              Display the distributor's ID.

       -d, --description
              Display a description of the currently installed distribution.

       -r, --release
              Display the release number of the currently installed distribution.

       -c, --codename
              Display the code name of the currently installed distribution.

       -a, --all
              Display all of the above information.

       -s, --short
              Use the short output format for any information displayed.  This format omits the leading header(s).

       -h, --help
              Show summary of options.

推荐阅读