Ubuntu Server的网络参数保存在文件
/etc/network/interfaces中,默认设置使用dhcp,内容如下:
# The primary network interface
auto eth0
iface eth0 inet dhcp
设置静态ip的方法如下:
1)编辑vi /etc/network/interfaces
1.1)将dhcp 一行屏蔽
# The primary network interface
auto eth0
#iface eth0 inet dhcp
1.2)添加和静态ip有关的参数
# The primary network interface
iface eth0 inet static
address 192.168.0.10
netmask 255.255.255.0
gateway 192.168.0.1
2)编辑vi
Ubuntu Server配置网络和查看IP地址
最新推荐文章于 2024-06-19 11:02:38 发布
为什么80%的码农都做不了架构师?>>> ...
摘要由CSDN通过智能技术生成