树莓派配置静态ip和动态DHCP获取ip
1 配置DHCP动态获取ip: 开启dhcpcd服务 pi@pi_new:~ $ !718 sudo vi /etc/network/interfaces pi@pi_new:~ $ sudo systemctl enable dhcpcd Synchronizing state of dhcpcd.service with SysV service script with /lib/systemd/systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install enable dhcpcd pi@pi_new:~ $ pi@pi_new:~ $ date Sun 4 Aug 10:05:55 HKT 2019 编辑/etc/network/interfaces,修改有线网卡获取ip方式为dhcp, pi@pi_new:~ $ sudo tail -30 /etc/network/interfaces # interfaces(5) file used by ifup(8) and ifdown(8)…