终端输入 ifconfig
并回车,查看需要修改的网卡名称
sudo ifconfig 网卡名 ip信息 netmask 掩码
route -n
查看网关)sudo route add default gw 网关信息 网卡名
永久修改需要对配置文件进行修改,然后重启网络服务即可
Ubuntu系统进行网络配置涉及到的配置文件
/etc/network/interfaces
IP等信息的配置文件
/etc/resolv.conf
DNS服务器的配置文件
sudo vim /etc/network/interfaces
静态ip(static ip)配置,常用于桥接模式下用于于主机通讯.其他设置可以参照(eth0配置静态IP,eth1配置成自动获取):
# The loopback network interface
auto lo
iface lo inet loopback
# static ip
auto eth0
iface eth0 inet static
address 192.168.43.100
netmask 255.255.255.0
gateway 192.168.43.1
# dynamic ip
auto eth1
iface eth1 inet dhcp
sudo /etc/init.d/networking restart
或
sudo service networking restart
因篇幅问题不能全部显示,请点此查看更多更全内容
Copyright © 2019- hzar.cn 版权所有 赣ICP备2024042791号-5
违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务