我已经在我的VPS中安装了Debian 8 64位。如果我需要知道在VPS命令中安装什么操作系统是uname -a和操作系统信息lsb_release -a。
但是在Debian发行版中,uname -a命令工作,但lsb_release -a命令不起作用。
发布于 2016-02-12 18:59:10
如果lsb_release -a无法工作,则需要安装该软件包:
sudo apt-get install lsb-release来自https://packages.debian.org/jessie/lsb-release
实用程序 lsb-release命令是一个简单的工具,可以帮助识别所使用的Linux发行版及其与的兼容性。除非安装了所需的元包,否则不会报告LSB的一致性。
如果安装lsb,lsb_release将输出更多信息,但也会安装更多软件包。此外,还应:
sudo apt-get install lsb-core来自https://packages.debian.org/jessie/lsb-core
这个包在Intel x86、Intel ia64 (Itanium)、IBM S390和带有Linux内核的PowerPC 32位体系结构上提供了Debian LinuxStandardBase4.1版本的核心实现。
没有lsb的输出-核心:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 8.3 (jessie)
Release: 8.3
Codename: jessie已安装lsb核心包的输出:
LSB Version: core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch:core-4.1-amd64:core-4.1-noarch:security-4.0-amd64:security-4.0-noarch:security-4.1-amd64:security-4.1-noarch
Distributor ID: Debian
Description: Debian GNU/Linux 8.3 (jessie)
Release: 8.3
Codename: jessie为lsb安装的辅助软件包(在我的例子中):
外星bc cups-bsd cups-客户端cups-通用debian辅助调试工具-debian lib32z1 libc6-i 386 libcupsfilters1 libcupsimage2 libmail-sendmail-perl librpm3 librpmbuild3 librpmio3 librpmsign1 libsys-hostname-perl lsb-security pax po-debconf rpm rpm-公用rpm2cpio
请注意,这些包通常是默认安装的,有些人(比如我)太在意在VPS中卸载它们。
我最初没有安装,最后我做出了一个折衷方案,就是让lsb_release,而不是lsb-core,以便不夸大软件包的数量。
发布于 2016-02-12 18:56:39
cat /etc/lsb-release
cat /etc/os-release如果这些失败了
ls -l /etc/*release*看看这些文件的内容
发布于 2016-02-12 23:38:46
您可以使用hostnamectl
hostnamectl产出:
Static hostname: debian
Icon name: computer
Chassis: Laptop
Machine ID: 4c983dae19f6403ca2c555c386cdeb14
Boot ID: 3b399eb976d04569a8514a1dczdv4d81
Operating System: Debian GNU/Linux 8 (jessie)
Kernel: Linux 3.16.0-4-amd64
Architecture: x86-64https://unix.stackexchange.com/questions/261855
复制相似问题