sudo nano /etc/dhcpcd.conf 尾部添加一下代码
interface eth0
static ip_address=192.168.1.10/24
static routers=192.168.1.1
static domain_name_servers=114.114.114.114
interface wlan0
static ip_address=192.168.10.42/24
static routers=192.168.10.254
static domain_name_servers=114.114.114.114