linux下的网络配置命令
首先进入管理员权限(su)
-
查看网络基本配置
ipconfig
-
修改基本配置
ifconfig eth0 192.168.1.10/24
route add default gw 192.168.1.1
echo nameserver 192.168.1.1 > /etc/resolv.conf
-
查看DNS
less /etc/resolv.conf
-
修改DNS
gedit /etc/resolv.conf
首先进入管理员权限(su)
查看网络基本配置
ipconfig
修改基本配置
ifconfig eth0 192.168.1.10/24
route add default gw 192.168.1.1
echo nameserver 192.168.1.1 > /etc/resolv.conf
查看DNS
less /etc/resolv.conf
修改DNS
gedit /etc/resolv.conf