
lsb_release
LSB (Linux Standard Base) 是一个由 Linux 基金会主导的项目,旨在标准化 Linux 系统的结构,使不同发行版之间能够保持一定程度的兼容性。
lsb_release
大多数主流 Linux 发行版都预装了
lsb_release
# Debian/Ubuntu 系统 sudo apt-get install lsb-release # RedHat/CentOS 系统 sudo yum install redhat-lsb-core # Arch Linux 系统 sudo pacman -S lsb-release
安装完成后,可以通过以下命令验证是否安装成功:
which lsb_release
如果返回类似
/usr/bin/lsb_release
lsb_release [选项]
| 选项 | 全称 | 说明 |
|---|---|---|
| @@######@@ | @@######@@ | 显示所有信息(默认行为) |
| @@######@@ | @@######@@ | 显示发行版描述 |
| @@######@@ | @@######@@ | 显示发行版 ID |
| @@######@@ | @@######@@ | 显示发行版版本号 |
| @@######@@ | @@######@@ | 显示发行版代号 |
| @@######@@ | @@######@@ | 以简短格式显示信息 |
| @@######@@ | @@######@@ | 显示帮助信息 |
| @@######@@ | @@######@@ | 显示命令版本信息 |
示例输出:
-a
示例输出:
--all
示例输出:
-d
示例输出:
--description
这是一个常见的提示信息,表示系统没有安装完整的 LSB 模块,但不会影响
-i
对于不支持
--id
如果
-r
--release
文件内容示例:
-c
--codename
-s
记住,虽然
--short
-h
--help
-v
--version
No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.3 LTS Release: 20.04 Codename: focal
Distributor ID: Ubuntu
Release: 20.04
Ubuntu
lsb_release
lsb_release
lsb_release
/etc/lsb-release
DISTRIB_ID=Ubuntu DISTRIB_RELEASE=20.04 DISTRIB_CODENAME=focal DISTRIB_DESCRIPTION="Ubuntu 20.04.3 LTS"
lsb_release
lsb_release
lsb_release
以上就是linux显示发行版信息是什么-lsb_release 命令使用与实例的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号