[operator]Ubuntu server 18 设置静态IP
Posted 蟒城贝勒爷
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[operator]Ubuntu server 18 设置静态IP相关的知识,希望对你有一定的参考价值。
[email protected]:~# cat /etc/netplan/50-cloud-init.yaml # This file is generated from information provided by # the datasource. Changes to it will not persist across an instance. # To disable cloud-init‘s network configuration capabilities, write a file # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following: # network: {config: disabled} network: ethernets: ens33: addresses: [192.168.115.148/24] gateway4: 192.168.115.2 dhcp4: false nameservers: addresses: [192.168.115.2] version: 2
看文件格式就知道这个文件严格遵守yaml语法格式,需要 使用root权限,设置好之后可以使用如下命令进行即时生效
[email protected]:~# netplan apply [email protected]-MesosMaster-Marathon:~# ping baidu.com PING baidu.com (220.181.57.216) 56(84) bytes of data. 64 bytes from 220.181.57.216 (220.181.57.216): icmp_seq=1 ttl=128 time=25.7 ms
以上是关于[operator]Ubuntu server 18 设置静态IP的主要内容,如果未能解决你的问题,请参考以下文章
Ubuntu:内核 5.6.0-rc3:file_operations 中不支持 IOCTL?
Setup and Configure the vsftpd server in CentOS 7 operation system
Reinstall Ubuntu Operating System with USB