Debian 10 buster已可以安装,设置静态IP方法如下。

先查看本机当前的IP地址,命令

ip address

信息如下:ens192是网卡名字,这个记住,后面要用到,下面的inet 192.168.0.139/24就是本机当前的ip地址,这个是路由器随机分配的。

输入:nano /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 ens192
# iface ens192 inet dhcp
auto ens192
iface ens192 inet static
address 192.168.0.3
netmask 255.255.255.0
gateway 192.168.0.1

reboot重启却可

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注