Total Pageviews

Friday 18 October 2024

如何查看linux vps的操作系统类型

命令1:  cat /etc/issue (这个命令有时没结果)

 命令2:lsb_release -a

命令3:cat /etc/os-release

示例:

root@racknerd-626f077:~# cat /etc/issue
Ubuntu 22.04.1 LTS \n \l

root@racknerd-626f077:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.1 LTS
Release:        22.04
Codename:       jammy
root@racknerd-626f077:~# lsb_release
No LSB modules are available.
root@racknerd-626f077:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.1 LTS
Release:        22.04
Codename:       jammy
root@racknerd-626f077:~# cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.1 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
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"
UBUNTU_CODENAME=jammy

root@racknerd-626f077:~# uname -a
Linux racknerd-626f077 5.15.0-46-generic #49-Ubuntu SMP Thu Aug 4 18:03:25 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
root@racknerd-626f077:~#

No comments:

Post a Comment