1.查看IP# ip addr
2.查看路由# ip route
3.查看DNS# cat /etc/resolv.conf
4.查看主机名# hostname
CentOS7 查看IP、Gateway、DNS、Hostname
原文:http://www.cnblogs.com/gispathfinder/p/6158652.html