centos7 - 查看内网ip和外网ip

Mr.Elibaron小于 1 分钟linux

centos7 - 查看内网ip和外网ip

1. 查看内网IP

ifconfig
# 简化输出
ifconfig | grep inet
或
ip addr 

2. 查看外网的ip

curl ifconfig.me

参考文章

Linux 开启 Swap分区 教程open in new window

上次编辑于:
贡献者: Elibaron