当前位置:网站首页>树莓派 3b+ 学习
树莓派 3b+ 学习
2022-06-27 11:42:00 【HHH 917】

电脑安装 putty 远程给树莓派使用命名行工具
树莓派安装xrdp 用于远程
sudo apt-get install xrdp 安装xrdp
tf卡 创建 ssh空白文件
创建 wpa_supplicant.conf 文件
文件内容
country=CN
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid=“CMCC-UE62-5G”
psk=“zy5zua59”
priority=10
}
Widows查看 连接设备 ip arp -a
树莓派 htop 查看 机子状况
树莓派 查看本机 ip ip addr
interface wlan0
static ip_address=你的ip地址/24
static routers=你的默认网关
static domain_name_servers=你的默认网关
link/ether b8:27:eb:b4:5b:ab brd ff:ff:ff:ff:ff:ff
inet 192.168.1.3/24 brd 192.168.1.255 scope global dynamic noprefixroute
inet6 2409:8a55:ee3:3790:c24b:1f50:a77:8c5a/64 scope global dynamic
inet6 fe80::6aa:5f0e:c9b9:e9fd/64 scope link
树莓派不休眠
3、修改桌面配置文件lightdm.conf
sudo nano /etc/lightdm/lightdm.conf
找到[Seat:*]这一项,在下面的‘#xserver-command=X’删除前面的注释符#,修改为以下
xserver-command=X -s 0-dpms
其中,-s 参数:设置屏幕保护不启动,0 数字零,-dpms 参数:关闭电源节能管理。
保存退出:Ctrl+X,按Y 再按回车。
树莓派配置静态ip地址
打开文件 sudo nano /etc/dhcpcd.config
输入静态ip 及网关
interface wlan0
static ip_address = 192.168.1.99
static routes=192.168.1.1
static domain_name_servers=192.168.1.1
Smaba
Ipv6地址填写 fe80::6aa:5f0e:c9b9:e9fd
填写时冒号改为- fe80–6aa-5f0e-c9b9-e9fd.ipv6-literal.net
Url填写 smb://fe80–6aa-5f0e-c9b9-e9fd.ipv6-literal.net/xxx
二、安装 Samba
samba 的安装很简单,命令行执行:
sudo apt-get install samba samba-common-bin
三、配置 Samba
配置文件为/etc/samba/smb.conf,这里对它进行修改,命令行执行:
sudo nano /etc/samba/smb.conf
注:nano 可以通过 ctrl+y(上一页) 和 ctrl+v(下一页) 实现翻页。
在文件末尾加上如下内容,其中 /mnt/udisk 为我设置的共享文件夹目录(将其替换为你想共享的目录即可,例如:/home/pi/public):
[public]
comment = public storage
path = /mnt/udisk
valid users = pi
read only = no
create mask = 0777
directory mask = 0777
guest ok = no
browseable = yes
ctrl+o 保存,之后 回车 确认,然后 ctrl+x 退出。
参数说明:
comment:共享文件夹说明
path:共享文件夹目录
valid users:有效用户
read only:是否只读
create mask:创建文件的权限
directory mask:创建文件夹的权限
guest ok:是否允许访客访问
browseable:是否可见
其中 valid users 即 pi 为有效用户,还需要添加其到 Samba 中,命令行执行:
sudo smbpasswd -a pi
设置有效用户
设置密码
如果需要配置每个用户可以读写自己的 home 目录,还可在“[homes]”节中,把 “read only = yes” 改为 “read only = no”。
home目录可读写
重启 samba 以生效配置,命令行执行:
sudo samba restart
注:Samba 默认开机自启,无需为重启担心
四、设置文件权限
在 Samba 配置文件设置权限后,还需在系统中将共享文件夹的权限设置为同配置文件中相同的权限,以确保其他用户正常访问及修改文件夹内容,命令行执行:
sudo chmod -R 777 /mnt/udisk
/mnt/udisk是你的共享目录
五、访问共享文件
Windows:
在资源管理器地址栏输入:\树莓派ip\public即可。
macOS:
打开 FInder,之后使用快捷键 cmd+k,服务器地址中填写smb://树莓派ip/public,之后点击连接即可。
使用vnc远程连接
树莓派
sudo raspi-config
选择 “interface Options”选择vnc 打开 然后 选择finish 完成
电脑 打开网站 realvnc.com下载 vnc viewer
苹果连接vnc url 填写 [fe80::6aa:5f0e:c9b9:e9fd]
http://t.zoukankan.com/torchstar-p-12005277.html
边栏推荐
- Wait, how do I use setmemorylimit?
- .NET6接入Skywalking链路追踪完整流程
- 面试突击60:什么情况会导致 MySQL 索引失效?
- 星际争霸的虫王IA退役2年搞AI,自叹不如了
- master公式
- i. Construction of mx6ull C language environment
- Interview shock 60: what will cause MySQL index invalidation?
- AUTOCAD——三种修剪方式
- Research Report on the overall scale, major producers, major regions, products and application segments of swine vaccine in the global market in 2022
- pull request
猜你喜欢

AutoCAD - three pruning methods
![[worthy of collection] centos7 installation MySQL complete operation command](/img/23/7c4b69e1abc3a3ceba9b79cebe1c9b.png)
[worthy of collection] centos7 installation MySQL complete operation command

从零开始搭建物联网系统

MapReduce原理剖析(深入源码)

Peak store app imitation station development play mode explanation source code sharing

Shell script learning notes

Open source model library of flying propeller industry: accelerating the development and application of enterprise AI tasks

15+ urban road element segmentation application, this segmentation model is enough!
![[tcapulusdb knowledge base] tcapulusdb doc acceptance - transaction execution introduction](/img/d9/f6735906a130834c4b3e28de2b2617.png)
[tcapulusdb knowledge base] tcapulusdb doc acceptance - transaction execution introduction

Challenges of machine learning system in production
随机推荐
. Net6 access skywalking link tracking complete process
AutoCAD - three pruning methods
Histrix工作原理
Wechat applet payment password input
Rxjs mergeMap 的使用场合
QStyle类用法总结(二)
The wonderful use of 0 length array in C language
Basic usage and principle of fork/join framework
[worthy of collection] centos7 installation MySQL complete operation command
[tcapulusdb knowledge base] tcapulusdb doc acceptance - transaction execution introduction
"24 of the 29 students in the class successfully went to graduate school" rushed to the hot search! Where are the remaining five?
Interview shock 60: what will cause MySQL index invalidation?
.NET6接入Skywalking链路追踪完整流程
R语言使用glm函数构建泊松对数线性回归模型处理三维列联表数据构建饱和模型、使用step函数基于AIC指标实现逐步回归筛选最佳模型、解读分析模型
Build the Internet of things system from scratch
[tcapulusdb knowledge base] tcapulusdb OMS business personnel permission introduction
Fork/Join 框架基本使用和原理
pull request
In depth analysis of error solutions and problems in dynamic loading of unity shadow and outline components
[tcapulusdb knowledge base] tcapulusdb doc acceptance - create business introduction