007--ubuntu修改ip地址

    技术2022-05-20  46

    sudo vim /etc/network/interfaces  修改iface eth0 inet dhcp 为iface eth0 inet static  并在这句后添加  address 192.168.1.1  netmask 255.255.255.0  gateway 192.168.1.254  保存退出后使用如下命令  /etc/init.d/networking restart  

     

    1、ubuntu系统修改IP地址:sudo gedit /etc/network/interfacesauto eth0iface eth0 inet staticaddress 219.218.122.168netmask  255.255.255.0gateway  219.218.122.254

    2、ubuntu系统修改DNS: sudo gedit /etc/resolv.confnameserver 202.194.15.12

    3、使网络生效:sudo /etc/init.d/networking restartUbuntu8.04虚拟机更换host主机后开机无法加载网卡,提示:No such device删除缓存文件,重启后解决。sudo rm /etc/udev/rules.d/70-persistent-net.rulesreboot


    最新回复(0)