Ubuntu18.04修改静态IP

  1. 虚拟网络编辑器填所要固定的IP,子网掩码,网关等
    在这里插入图片描述
  2. 配置文件
    vi /etc/network/interfaces,加入
auto ens33
iface ens33 inet static
address 192.168.75.1
netmask 255.255.255.0
gateway 192.168.75.2

可是我后面需要git的时候无法解析,所以继续配置DNS
可参考:https://blog.csdn.net/lanxuezaipiao/article/details/21550753

然后ping www.baidu.com ,不知道为什么我的会出现特别多,下面的还没完,以后再查吧!

root@ubuntu:/usr/local/src# ping www.baidu.com
PING www.a.shifen.com (61.135.169.125) 56(84) bytes of data.
64 bytes from 61.135.169.125 (61.135.169.125): icmp_seq=1 ttl=128 time=32.5 ms
64 bytes from 61.135.169.125 (61.135.169.125): icmp_seq=2 ttl=128 time=24.1 ms
64 bytes from 61.135.169.125 (61.135.169.125): icmp_seq=3 ttl=128 time=23.5 ms
64 bytes from 61.135.169.125 (61.135.169.125): icmp_seq=4 ttl=128 time=23.6 ms
64 bytes from 61.135.169.125 (61.135.169.125): icmp_seq=5 ttl=128 time=24.5 ms
64 bytes from 61.135.169.125 (61.135.169.125): icmp_seq=6 ttl=128 time=24.0 ms
64 bytes from 61.135.169.125 (61.135.169.125): icmp_seq=7 ttl=128 time=23.7 ms
64 bytes from 61.135.169.125 (61.135.169.125): icmp_seq=8 ttl=128 time=24.6 ms
64 bytes from 61.135.169.125 (61.135.169.125): icmp_seq=9 ttl=128 time=23.0 ms
64 bytes from 61.135.169.125 (61.135.169.125): icmp_seq=10 ttl=128 time=25.7 ms
64 bytes from 61.135.169.125 (61.135.169.125): icmp_seq=11 ttl=128 time=24.2 ms
64 bytes from 61.135.169.125 (61.135.169.125): icmp_seq=12 ttl=128 time=23.2 ms
64 bytes from 61.135.169.125 (61.135.169.125): icmp_seq=13 ttl=128 time=24.0 ms
64 bytes from 61.135.169.125 (61.135.169.125): icmp_seq=14 ttl=128 time=23.7 ms
64 bytes from 61.135.169.125 (61.135.169.125): icmp_seq=15 ttl=128 time=24.0 ms
64 bytes from 61.135.169.125 (61.135.169.125): icmp_seq=16 ttl=128 time=24.4 ms
64 bytes from 61.135.169.125 (61.135.169.125): icmp_seq=17 ttl=128 time=24.0 ms
64 bytes from 61.135.169.125 (61.135.169.125): icmp_seq=18 ttl=128 time=23.2 ms
64 bytes from 61.135.169.125 (61.135.169.125): icmp_seq=19 ttl=128 time=23.7 ms
64 bytes from 61.135.169.125 (61.135.169.125): icmp_seq=20 ttl=128 time=23.9 ms
64 bytes from 61.135.169.125 (61.135.169.125): icmp_seq=21 ttl=128 time=24.2 ms
64 bytes from 61.135.169.125 (61.135.169.125): icmp_seq=22 ttl=128 time=23.2 ms
64 bytes from 61.135.169.125 (61.135.169.125): icmp_seq=23 ttl=128 time=24.9 ms
64 bytes from 61.135.169.125 (61.135.169.125): icmp_seq=24 ttl=128 time=30.0 ms
64 bytes from 61.135.169.125

网络配置到此为止,终于解决了!!!!太累了···

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值