Ubuntu借助windows实现网络访问

参考自:https://blog.csdn.net/hmzjwhmzjw/article/details/79035547?utm_medium=referral&utm_source=debugrun

设置是按照上面这个教程来的,但是他里面没具体讲实现,小弟不才为了备忘,来做点记录。

windows下:

1.连接到wifi后,打开“网络和设置中心”——“更改适配器设置”——“找到你当前的无线网卡”——属性——共享——“允许。。。”,下面选择本地连接——确认框,确定——确定。

2.将本地连接ip设置为 192.168.137.1,子网掩码自动生成

Ubuntu下:

1.编辑/etc/network/interfaces文件,这里假设网卡为eth0,在文件中添加以下内容:

inet eth0 iface static

address 192.168.137.2

gateway 192.168.137.1

netmask 255.255.255.0

保存。

2.编辑/etc/reslov.conf文件,在文件中添加以下内容:

nameserver  192.168.137.1

保存。

重启Ubuntu,现在应该就可以看到右上角状态栏提示“网络已连接”了,测试:ping  baidu.com


猜你喜欢

转载自blog.csdn.net/yanlutian/article/details/80862494