查看網(wǎng)卡及IP
ifconfig
ip link [show]
---------
ifconfig -a
ip addr show
激活和停止網(wǎng)絡(luò)接口
ifconfig eth0 up/down
ip link set eth0 up/down
設(shè)置IP地址
ifconfig eth0 192.168.0.56 netmask 255.255.255.0 broadcast 192.168.0.255
ip addr add 192.168.0.193/24 dev wlan0
ip addr del 192.168.0.193/24 dev wlan0
查看網(wǎng)關(guān)路由
route -n
ip route show
設(shè)置網(wǎng)關(guān)(默認(rèn)路由)
route add default gw 192.168.0.1
ip route add default via 192.168.0.1 (默認(rèn)路由)
ip route del default
最后編輯于 :
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者