1. 查看内网IP
ifconfig
# 简化输出
ifconfig | grep inet
# 简化输出
或
ifconfig -a
或
ip addr 
  1. 查看外网的ip
curl ifconfig.me