# debian 12修改静态IP地址
vim /etc/network/interfaces
# The primary network interface
# allow-hotplug ens33
# iface ens33 inet dhcp
auto ens33
iface ens33 inet static
address 192.168.200.150
netmask 255.255.255.0
gateway 192.168.200.2
重启network
systemctl restart networking.service
查看ip
ip a
··· ···
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 00:0c:29:94:0b:b8 brd ff:ff:ff:ff:ff:ff
altname enp2s1
inet 192.168.200.150/24 brd 192.168.200.255 scope global ens33
valid_lft forever preferred_lft forever