ubuntu+centos 通用的命令
查看外网ip
curl ifconfig.me
ubuntu
cat /etc/issue
Ubuntu 18.04.5 LTS \n \l
lsb_release -a
root@ubuntu18:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic
CentOS
cat /etc/issue
\S
Kernel \r on an \m
cat /etc/redhet-release
CentOS Linux release x.x.xxxx (Core)
故,先用cat /etc/issue
,若没有找到自己要的信息,在分别使用 lsb_release -a
或 cat /etc/redhet-release