当前位置:网站首页>如何设置树莓派上网功能
如何设置树莓派上网功能
2022-07-13 17:54:00 【2021 Nqq】
问题描述:
在使用树莓派3b时,出现无法使用浏览器的情况,就是连上热点或者WiFi但不能上网,后来根据下面两个教程更改的IP地址的设置,最后成功使用上网功能。
https://blog.csdn.net/u013690521/article/details/108140942
https://blog.csdn.net/fzc000/article/details/78938744
步骤1:
Linux系统/etc/resolv.conf文件为只读模式,且无法更改权限
/etc/resolv.conf 为只读模式
使用 chmod +w /etc/resolv.conf 命令修改权限会报如下的错:
1|chmod: changing permissions of `/etc/resolv.conf': Operation not permitted
解决方法:
使用 chattr 命令可以解除这个限制
首先先查看一下属性
# 看有没有 i 属性
sudo lsattr /etc/resolv.conf
# 假如有,去除i这个属性
sudo chattr -i /etc/resolv.conf
# 然后再修改权限,就可以成功修改了
chmod +w /etc/resolv.conf
这时候就可以修改/etc/resolv.conf文件,然后再开始步骤2的修改
步骤2:
树莓派连接手机热点和某些wifi能够上网,而在连接一些wifi后进入网站却显示无法解析域名。此时可以通过修改树莓派配置文件来解决这个问题。
首先输入sudo nano /etc/resolv.conf命令来修改配置文件,
然后将nameserver后面的一系列数字改成8.8.8.8即可。
比如我的原来是192.168.1.1,后来改成8.8.8.8就可以成功上网了。
边栏推荐
- [signal conditioning] ADC protection circuit /adc buffer
- keil5软件报错 Error: L6406E: No space in execution regions with .ANY selector matching xxx
- YUV format data
- 嵌入式软件开发 STM32F407 按键输入 标准库版
- Promise---同步?异步?
- 第十二届蓝桥杯嵌入式模拟题
- 【NeurIPS】ViTAE: Vision Transformer Advanced by Exploring Intrinsic Inductive Bias
- Embedded software development stm32f407 buzzer register version
- u-boot 2021.01 版本编译
- How to make electronic signature transparent
猜你喜欢

【Verilog】子模块连接相关问题(加法器及其优化)

【Multisim】关于Multisim仿真“运放积分器”出现的问题以及解决方法

第一章 DHT11温湿度传感器的使用

stm32f429+LAN4720A+lwip 问题记录及解决

GY-53红外激光测距模块的使用以及pwm模式代码的实现

Keil5 shortcut key

Chapter 4 stm32+ld3320+syn6288+dht11 realize voice acquisition of temperature and humidity values (Part 1)

虚拟内存位置结构(保留区、代码区、栈区、堆区、字面值常量区)与变量修饰符(const、auto、static、register、volatile、extern)

Embedded software development stm32f407 buzzer standard library version

2022.6.24~2022.8.26 假期学习计划
随机推荐
[signal conditioning] example of precision detection circuit and PCB
MATLAB警告:名称不存在或不是目录
TypeScript基础配置使用教程(在VScode中自动编译)
Blue Bridge Cup embedded Hal library Tim_ BASE
Embedded software development stm32f407 racing lantern standard library version
Supervisor series: 4. Sub process
GY-53红外激光测距模块的使用以及pwm模式代码的实现
[signal conditioning] ADC protection circuit /adc buffer
OpenGL 3D graphics development notes, terrain, lighting, shadows, etc
MPU6050的一些使用方法汇总
Train yolov3 on colab (I)
Introduction to STM32 GPIO details
U-boot 2021.01 version compilation
【PCB】關於電賽——硬件設計和PCB繪制的一些心得(持續更新)
第二章 SYN6288语音合成模块的使用
【信号调理】精密检波电路和PCB示例
CodeBlocks快捷键
蓝桥杯嵌入式-HAL库-LED_TEST
supervisor系列:4、子进程
【MATLAB】matlab第三课——绘图进阶