- sudo nano /etc/dhcpcd.conf
以太网:
interface eth0
static ip_address=121.248.54.54/24
static routers=121.248.54.55
static domain_name_servers=121.248.0.1 8.8.8.8
无线:
interface wlan0
static ip_address=192.168.0.200/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1
static ip_address = ip /掩码
static routers 需要通过 IP route 查看