lsb_release:显示发行版本信息

  1. # 显示发行版的 Linux 版本、ID、描述、具体版本号等
  2. $ lsb_release -a

/etc/issue:欢迎信息

  1. # 显示 login 提示符出现之前的欢迎信息
  2. $ cat /etc/issue
  3. Debian GNU/Linux 11 \n \l

/etc/os-release:操作系统标识数据

  1. $ cat /etc/os-release
  2. PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
  3. NAME="Debian GNU/Linux"
  4. VERSION_ID="11"
  5. VERSION="11 (bullseye)"
  6. VERSION_CODENAME=bullseye
  7. ID=debian
  8. HOME_URL="https://www.debian.org/"
  9. SUPPORT_URL="https://www.debian.org/support"
  10. BUG_REPORT_URL="https://bugs.debian.org/"

hostnamectl:查询系统主机名