debian 更改IP

admin   ·   发表于 4个月前   ·   linux

1、root@debian030:/etc/network# cat /etc/network/interfaces

# This file describes the network interfaces available on your system

# and how to activate them. For more information, see interfaces(5).


source /etc/network/interfaces.d/*


# The loopback network interface

auto lo

iface lo inet loopback


# The primary network interface

allow-hotplug ens32

iface ens32 inet static

        address 172.31.0.30/16

        gateway 172.31.0.254

        # dns-* options are implemented by the resolvconf package, if installed

        dns-nameservers 202.102.152.3



2、sudo systemctl restart networking.service

3、ip add show


0 条回复   |  直到 4个月前 | 240 次浏览
登录后才可发表内容