1 背景 实验室的服务器需要配置静态IP。 2 详细步骤 1、输入命令ip addr确认要修改静态ip的网卡号。 2、vim /etc/netplan/xxx.yaml,将里面的内容按如下格式修改。 3、使用sudo netplan apply命令使修改生效,然后再使用ip addr查看效果。