为什么在ubuntu上没有-a参数的情况下不能运行lsb_release?因为当我运行lsb_release命令时,我收到消息“没有可用的LSB模块”。
答案 0 :(得分:1)
说明: 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.
答案 1 :(得分:0)
从man page到lsb_release
:
If no options are given, the -v option is assumed.
-v选项:
-v, --version
Show the version of the LSB against which your current installa‐
tion is compliant. The version is expressed as a colon sepa‐
rated list of LSB module descriptions.
如果没有安装任何lsb模块,则会收到您所描述的消息。 -a
开关显示所有可用信息。