debian 设置ip
设置ip 打开 /etc/network/interfaces 添加如下内容
luomb@debian:/$ vi /etc/network/interfaces
M
#Thisfiledescribesthenetworkinterfacesavailableonyoursystem
#andhowtoactivatethem.Formoreinformation,seeinterfaces(5).
#Theloopbacknetworkinterface
#autolo
#ifaceloinetloopback
#Theprimarynetworkinterface
#allow-hotplugeth0
#ifaceeth0inetdhcp
autoeth0
ifaceeth0inetstatic
address192.168.50.165
netmask255.255.255.0
gateway192.168.50.1
设置DNS服务器:luomb@debian:/$ vi /etc/resolv.conf
nameserver202.96.128.86
nameserver 8.8.8.8用下面的命令使网络设置生效
sudo /etc/init.d/networking restart
也可以在命令行下直接输入下面的命令来获取地址
sudo dhclient eth0
IP关闭
ifconfig eth0 up
IP打开
ifconfig eth0 down
相关推荐
菜鸟上路CCLinux 2020-11-04
xiaoemo0 2020-08-09
84931231 2020-07-30
82941732 2020-07-27
wh0 2020-07-27
taianxiaojia 2020-07-15
mattraynor 2020-06-25
82941732 2020-06-11
安得情怀似旧时 2020-06-08
libra0 2020-06-01
84931231 2020-05-06
Summer的小屋 2020-03-26
82941732 2020-03-10
82941732 2020-03-04
咏月东南 2020-02-25
zhongcanw 2020-02-22