centos7 - 查看内网ip和外网ip

zszdeveloplinux小于 1 分钟

centos7 - 查看内网ip和外网ip

1. 查看内网IP

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

2. 查看外网的ip

curl ifconfig.me

参考文章

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

Loading...