Linux系统网络配置
Ubuntu
修改IP
$ sudo nano /etc/netplan/00-installer-config.yaml
# This is the network config written by 'subiquity'
network:
  ethernets:
    eno1:
      addresses:
      - 172.16.33.1/24
      gateway4: 172.16.33.254
      nameservers: {}
  version: 2
应用配置
$ sudo netplan apply
# 推荐使用 debug 参数
$ sudo netplan --debug apply
或者
sudo netplan generate
验证
ip a | grep eno1
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    inet 172.16.33.1/24 brd 172.16.33.255 scope global eno1
参考资料
- How to setup a static IP on Ubuntu Server 18.04
 - How to configure Network Settings in Ubuntu 18.04 Bionic Beaver
 - How To Configure IP Address In Ubuntu 18.04 LTS
 - How to configure a static IP address in Ubuntu Server 18.04
 - How to Configure Network Static IP Address in Ubuntu 18.04
 - Configure Static IP Addresses On Ubuntu 18.04 LTS Server
 - How to configure static IP address on Ubuntu 18.04 Bionic Beaver Linux
 - linux 下 /etc/network/interfaces 作用
 - OpenVINO™ Security Add-on