设置ip
/etc/network/interfaces
# This file describes the network interfaces available on your system
 # and how to activate them. For more information, see interfaces(5).
 
# The loopback network interface
 auto lo
 iface lo inet loopback
 
auto eth0
 iface eth0 inet static                //配置eth0使用默认的静态地址
 address 192.168.77.133        //设置eth0的IP地址
 netmask 255.255.255.0          //配置eth0的子网掩码
 gateway 192.168.77.254        //配置当前主机的默认网关
设置dns
/etc/resovl.conf  
domain
nameserver 10.10.10.10
nameserver 102.54.16.2
重起服务:
/etc/init.d/networking restart
 
/etc/init.d/network-manager restart

相关文章:

  • 2021-08-31
  • 2021-12-04
  • 2021-11-19
  • 2021-06-20
  • 2021-08-02
  • 2021-04-24
  • 2021-09-05
  • 2021-08-20
猜你喜欢
  • 2022-02-12
  • 2021-11-22
  • 2021-07-25
  • 2022-12-23
  • 2021-08-10
  • 2021-12-03
  • 2021-08-24
相关资源
相似解决方案