本文為joshua317原創文章,轉載請注明:轉載自joshua317博客 https://www.joshua317.com/article/232
1 查看網卡配置文件
cat /etc/sysconfig/network-scripts/ifcfg-eth0
注意1:如果網卡配置是動態獲取的,通過這種方式可能看不到;
注意2:在查看配置網絡之前我們先要知道centos的網卡名稱是什么,centos7不再使用ifconfig命令,可通過命令ip addr
查看,如圖,網卡名為eth0
2 通過ip命令
ip route show
3 通過route命令
route -n
4 通過netstat命令
netstat -rn
本文為joshua317原創文章,轉載請注明:轉載自joshua317博客 https://www.joshua317.com/article/232