sudo nano /etc/dhcpcd.conf
interface eth0
static ip_address=192.168.123.99/24
static routers=192.168.123.1
static domain_name_servers=192.168.123.1 119.29.29.29
修改完之后,ctrl+x退出,问是否保存,Y,再按Enter退出即可
https://www.jianshu.com/p/f9cb0f85a4e6