ubuntu18.04_server配置静态IPv4
2022/4/29 7:16:06
本文主要是介绍ubuntu18.04_server配置静态IPv4,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
ifconfig 返回如下: enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.19 netmask 255.255.255.0 broadcast 192.168.1.255 inet6 fe80::a00:27ff:fe48:cd59 prefixlen 64 scopeid 0x20<link> inet6 2408:8207:7899:3330:a00:27ff:fe48:cd59 prefixlen 64 scopeid 0x0<global> ether 08:00:27:48:cd:59 txqueuelen 1000 (Ethernet) RX packets 7388 bytes 10431679 (10.4 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 1812 bytes 185665 (185.6 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 120 bytes 9880 (9.8 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 120 bytes 9880 (9.8 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
sudo vim /etc/netplan/*.yaml 编辑enp0s3这块网卡的yaml
vim内容如下
network: ethernets: enp0s3: dhcp4: false addresses: [192.168.1.19/24] gateway4: 192.168.1.1 nameservers: addresses: [119.29.29.29] version: 2
sudo netplan ifconfig 查看是否修改成功
这篇关于ubuntu18.04_server配置静态IPv4的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-05-15鸿蒙生态设备数量超8亿台
- 2024-05-13TiDB + ES:转转业财系统亿级数据存储优化实践
- 2024-05-09“2024鸿蒙零基础快速实战-仿抖音App开发(ArkTS版)”实战课程已上线
- 2024-05-09聊聊如何通过arthas-tunnel-server来远程管理所有需要arthas监控的应用
- 2024-05-09log4j2这么配就对了
- 2024-05-09nginx修改Content-Type
- 2024-05-09Redis多数据源,看这篇就够了
- 2024-05-09Google Chrome驱动程序 124.0.6367.62(正式版本)去哪下载?
- 2024-05-09有没有大佬知道这种数据应该怎么抓取呀?
- 2024-05-09这种运行结果里的10.100000001,怎么能最快改成10.1?