编辑“/etc/network/interfaces”文件
内容如下
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# 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
# 网卡名
auto ens33
iface ens33 inet static
# IP地址
address 10.10.1.110
# 网关
gateway 10.10.1.2
# 子网
netmask 255.255.255.0
# DNS服务器
dns-nameserver 10.10.1.2
|