参考文档: https://www.jb51.net/os/Ubuntu/418951.html https://blog.csdn.net/ying1989920/article/details/48385427 添加临时ip地址(设备重启后不生效) sudo ip addr add 192.168.1.104/24 dev enp0s3 //给设备 enp0s3 添加 ip 地址 sudo ip address show enp0s3 //查看配置是否生效 sudo ip addr del…
前言 连接远程server重启的时候发现IP发生变化,影响远程连接,此时,需要将server配置为静态IP. 系统环境 ubuntu16.04 操作过程 1. 设置IP和DNS command sudo vi /etc/networks/interfaces 添加蓝色部分内容 #The loopback network interface auto lo iface lo inet loopback # The primary network interface auto ens0_name /…