溫馨提示×

Ubuntu下如何配置IP地址

小新
384
2021-03-02 18:33:38
欄目: 智能運維

Ubuntu下如何配置IP地址

Ubuntu下配置IP地址的方法:

為網卡配置靜態IP地址。

1.打開終端輸入以下命令打開網卡配置文件。

sudo vi /etc/network/interfaces

2.使用以下代碼來替換有關eth0的行。

# The primary network interface

auto eth0

iface eth0 inet static

address 192.168.2.1

gateway 192.168.2.254

netmask 255.255.255.0

#network 192.168.2.0

#broadcast 192.168.2.255

注:將以上ip地址等信息配置成你自己的

3.再輸入以下命令使修改生效即可。

sudo /etc/init.d/networking restart

0
亚洲午夜精品一区二区_中文无码日韩欧免_久久香蕉精品视频_欧美主播一区二区三区美女