ubuntu让/etc/hosts修改后立刻生效
ubuntu系統中:
ifconfig
enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> ?mtu 1500
? ? ? ? inet 192.168.0.103 ?netmask 255.255.255.0 ?broadcast 192.168.0.255
? ? ? ? ether 74:d4:35:2e:da:c0 ?txqueuelen 1000 ?(Ethernet)
? ? ? ? RX packets 856767 ?bytes 962251105 (962.2 MB)
? ? ? ? RX errors 0 ?dropped 0 ?overruns 0 ?frame 0
? ? ? ? TX packets 673791 ?bytes 92635286 (92.6 MB)
? ? ? ? TX errors 0 ?dropped 0 overruns 0 ?carrier 0 ?collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> ?mtu 65536
? ? ? ? inet 127.0.0.1 ?netmask 255.0.0.0
? ? ? ? inet6 ::1 ?prefixlen 128 ?scopeid 0x10<host>
? ? ? ? loop ?txqueuelen 1000 ?(Local Loopback)
? ? ? ? RX packets 99682 ?bytes 25803522 (25.8 MB)
? ? ? ? RX errors 0 ?dropped 0 ?overruns 0 ?frame 0
? ? ? ? TX packets 99682 ?bytes 25803522 (25.8 MB)
? ? ? ? TX errors 0 ?dropped 0 overruns 0 ?carrier 0 ?collisions 0
?
可以看到電腦連接的是無線網enp2s0
那么生效命令如下:
# ifconfig enp2s0 down
# ifconfig enp2s0 up
?
?
總結
以上是生活随笔為你收集整理的ubuntu让/etc/hosts修改后立刻生效的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 齐鲁证券改名叫什么
- 下一篇: 番茄小说app如何手动对换钱(好看的小说