Ubuntu不能上网解决办法
Ubuntu 不能 解决办法 上网
2023-09-11 14:21:04 时间
一、设置IP、网关、DNS
新安装的Ubuntu系统ifconfig后发现没有ip,所以要设置IP、网关、DNS等,编辑 /etc/networking/interfases
sudo vi /etc/networking/interfases
设置DNS:
修改文件:/etc/resolvconf/resolv.conf.d/base(这个文件默认是空的)
sudo vi /etc/resolvconf/resolv.conf.d/base
在里面插入后保存:
nameserver 8.8.8.8
然后执行更新
sudo resolvconf -u
设置网关:
在设置网关时不是随意填写的,填写后不一定能ping的通,网关地址可以在workstation的编辑菜单中的虚拟网络编辑器中查看
设置IP:
刚开始写的是静态ip: iface ens33 inet static
不能ping通百度域名www.baidu.com,提示unknown host
但是可以ping通IP,将静态ip修改为:dhpc
然后执行sudo dhclient ens33来更新IP
sudo dhclient ens33
然后重启网卡
etc/init.d/networking restart
再次ping www.baidu.com,终于给我返回了,
相关文章
- 【Ubuntu】ubuntu更新设置
- 【Ubuntu】ubuntu物理机安装方法:U盘安装
- 详细介绍Ubuntu man手册帮助应用
- Ubuntu 10.1 server 网络配置
- Ubuntu 20.04下OpenCV的安装
- 最简单的教程:在Ubuntu操作系统里安装Docker
- ubuntu 中wget (下载)命令用法
- Ubuntu:Ubuntu系统下在pycharm软件内配置anaconda环境(一张图轻松搞定!)
- SDN第二章 Ubuntu开启/关闭防火墙
- 【ubuntu】使用ubuntu杀死指定端口
- ubuntu系统同步上海时间
- ubuntu安装字体
- 虚拟机中ubuntu不能联网问题的解决——NAT方式
- ubuntu 配置git
- Ubuntu 里的Spyder不能切换中文输入
- ubuntu spyder 不能输入中文
- Ubuntu中使用sudo执行命令提示:ubuntu is not in the sudoers file. This incident will be reported.
- Ubuntu 20.04.3无法获取ip不能上网,重启网络出现unit NetworkManager.service not found
- Ubuntu 18.04 安装 GeForce RTX 3090
- Ubuntu安装minicom串口工具(二十五)
- ubuntu 13.10 Rhythmbox不能播放mp3 和中文乱码的问题
- ubuntu 系统设置bugzilla制
- bash no such file or directory in ubuntu 1404
- Ubuntu下Sublime Text 3解决无法输入中文的方法
- Ubuntu之xrdp远程桌面安装和使用