ubuntu配置静态IP

命令
sudo ifconfig ens33 20.20.20.40/24

ubuntu@ubuntu:/etc/netplan$ ip add
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:0c:29:08:4b:94 brd ff:ff:ff:ff:ff:ff
ubuntu@ubuntu:/etc/netplan$ sudo ifconfig ens33 20.20.20.40/24
ubuntu@ubuntu:/etc/netplan$ ip add

2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:0c:29:08:4b:94 brd ff:ff:ff:ff:ff:ff
    inet 20.20.20.40/24 brd 20.20.20.255 scope global ens33
       valid_lft forever preferred_lft forever
    inet6 fe80::ea34:5560:e57b:87c8/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

在这里插入图片描述

https://www.cnblogs.com/opsprobe/p/9979234.html

©️2020 CSDN 皮肤主题: 鲸 设计师:meimeiellie 返回首页