uname命令
# uname --help Usage: uname [OPTION]... Print certain system information. With no OPTION, same as -s. -a, --all print all information, in the following order, except omit -p and -i if unknown: -s, --kernel-name print the kernel name -n, --nodename print the network node hostname -r, --kernel-release print the kernel release -v, --kernel-version print the kernel version -m, --machine print the machine hardware name -p, --processor print the processor type or "unknown" -i, --hardware-platform print the hardware platform or "unknown" -o, --operating-system print the operating system --help display this help and exit --version output version information and exit GNU coreutils online help: <http://www.gnu.org/software/coreutils/> For complete documentation, run: info coreutils 'uname invocation' (base) [root@analysis ~]# uname -a Linux analysis 4.4.216-1.el7.elrepo.x86_64 #1 SMP Wed Mar 11 09:13:43 EDT 2020 x86_64 x86_64 x86_64 GNU/Linux (base) [root@analysis ~]# uname -s Linux (base) [root@analysis ~]# uname -n analysis (base) [root@analysis ~]# uname -r 4.4.216-1.el7.elrepo.x86_64 (base) [root@analysis ~]# uname -v #1 SMP Wed Mar 11 09:13:43 EDT 2020 (base) [root@analysis ~]# uname -m x86_64 (base) [root@analysis ~]# uname -p x86_64 (base) [root@analysis ~]# uname -i x86_64 (base) [root@analysis ~]# uname -o GNU/Linux
lsb_release 命令
$ lsb_release -a LSB Version: n/a Distributor ID: ManjaroLinux Description: Manjaro Linux Release: 19.0.2 Codename: Kyria $ lsb_release -h FSG lsb_release v1.4 prints certain LSB (Linux Standard Base) and Distribution information. Usage: lsb_release [OPTION]... With no OPTION specified it is the same as -v. Options: -v, --version Display the version of the LSB specification against which the distribution is compliant. -i, --id Display the string id of the distributor. -d, --description Display the single line text description of the distribution. -r, --release Display the release number of the distribution. -c, --codename Display the codename according to the distribution release. -a, --all Display all of the above information. -s, --short Display all of the above information in short output format. -h, --help Display this message. $ lsb_release -v LSB Version: n/a $ lsb_release -i Distributor ID: ManjaroLinux $ lsb_release -d Description: Manjaro Linux $ lsb_release -r Release: 19.0.2 $ lsb_release -c Codename: Kyria $ lsb_release -s n/a
其他方法:
1.
# cat /etc/centos-release CentOS Linux release 7.7.1908 (Core)
2.
$ ls /etc/| grep rel arch-release lsb-release manjaro-release os-release $ cat /etc/arch-release Manjaro Linux $ cat /etc/lsb-release DISTRIB_ID=ManjaroLinux DISTRIB_RELEASE=19.0.2 DISTRIB_CODENAME=Kyria DISTRIB_DESCRIPTION="Manjaro Linux" $ cat /etc/os-release NAME="Manjaro Linux" ID=manjaro ID_LIKE=arch PRETTY_NAME="Manjaro Linux" ANSI_COLOR="1;32" HOME_URL="https://www.manjaro.org/" SUPPORT_URL="https://www.manjaro.org/" BUG_REPORT_URL="https://bugs.manjaro.org/" LOGO=manjarolinux
完结!!