来源:http://blog.csdn.net/duyiwuer2009/article/details/26263855 1. ip route show $ ip route show default via 192.168.217.2 dev eth0 metric 100 192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 192.168.217.0/24 dev eth0 proto ke
1. Ubuntu18.04 修改IP地址 修改 sudo vim /etc/netplan/50-cloud-init.yaml文件 # This file is generated from information provided by # the datasource. Changes to it will not persist across an instance. # To disable cloud-init's network configuration capabilitie
ubuntu设置静态IP地址后,上不了网 文章中也提到,如果是在/etc/resolv.conf添加DNS,由于Ubuntu 有一个 resolvconf 服务,如果重启它,那么 /etc/resolv.conf 的内容会被修改成默认的样子,文件里也有提示文字:“DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN”,所以不能直接修改 /etc/resolv.conf. 还有一点要注意的就是,/etc/resolv.c
Linux下查看网关方法:route -n ip route show traceroute www.prudentwoo.com -s 100 第一行就是自己的默认网关 netstat -r more /etc/network/interfaces Debian/Ubuntu Linux more /etc/sysconfig/network-scripts/ifcfg-eth0 Red Hat