IP
查看本地IP
最简单的方法:

hostname -i
查看远程IP

# 查看外网ip的详细信息curl cip.cc# 查看纯ipcurl ip.cip.cc
找不到IP怎么办
1、安装net-tools
hostname
# 查看hostname# 临时修改hostname NewName# 永久修改vim /etc/hostname
本地Hosts
vim /etc/hosts
不能识别域名
# 查看ifconfig# 编辑网络配置文件vim /etc/sysconfig/network-scripts/ifcfg-ens33# ONBOOT=yes 激活网卡# 重启网络服务service network restart
