树莓派系统安装和远程访问

1.安装树莓派系统

 1.格式化SD卡        

  先用SDFormatter格式化SD卡,Drive是SD卡名,Size容量大小,直接点格式化快速格式化即可。

2. 烧录系统 

登录树莓派官网(https://www.raspberrypi.org/)下载系统镜像,选一个自己喜欢的系统,下载后解压出来得到.img文件。  网上下载一个Win32DiskImager的工具,找到解压好的.img文件,点击write就可以写入img镜像到SD卡

2.ssh远程连接树莓派

看见笔记本有HDMI接口以为可以用笔记本当显示器,插上去发现没反应,查了一下才知道一般笔记本的HDMI只用于输出不能当作输入,没有显示屏与路由器,笔记本是网线连着校园网。

手机开热点笔记本连,然后需要打开【网络和共享中心】->【更改适配器设置】-右键单击【WLAN】->【属性】->【共享】

【*】 2016-11官方发布的Raspbian系统镜像,系统默认禁用了 SSH 服务,在SD卡根目录创建文本文件重命名为ssh并删除后缀名,之后才能ssh访问树莓派 

SD卡插入树莓派,插好充电器树莓派自动启动,网线一端接树莓派一端接笔记本,win10打开cmd,输入arp -a

192.168.137.1是本机地址,动态的是树莓派的 

使用ssh登录软件putty,securecrt等。我用的是securecrt hostname填树莓派ip地址,端口默认22,username pi 密码 raspaberry

连接好以后改树莓派配置

pi@raspberrypi:~$ sudo raspi-config 


                              ┌─────────────────────────────┤ Raspberry Pi Software Configuration Tool (raspi-config) 
                              │                                                                                                                      │
                              │                  1 Change User Password Change password for the default user (pi)                                    │
                              │                  2 Hostname             Set the visible name for this Pi on a network                                │
                              │                  3 Boot Options         Configure options for start-up                                               │
                              │                  4 Localisation Options Set up language and regional settings to match your location                 │
                              │                  5 Interfacing Options  Configure connections to peripherals                                         │
                              │                  6 Overclock            Configure overclocking for your Pi                                           │
                              │                  7 Advanced Options     Configure advanced settings                                                  │
                              │                  8 Update               Update this tool to the latest version                                       │
                              │                  9 About raspi-config   Information about this configuration tool                                    │
                              │                                                                                                                      │
                              │                                                                                                                      │
                              │                                                                                                                      │
                              │                                  <Select>                                  <Finish>                                  │
                              │                                                                                                                      │
                              └───────────────────────────────────────────────────────────

选择 5后 enable ssh ,vnc                   
pi@raspberrypi:~$ sudo raspi-config 

选择 7  然后  A1 Expand Filesystem Ensures that all of the SD card storage is available to the OS          

烧录系统后看到SD卡容量很小,要使用这个选项来扩展文件系统,将树莓派的更分区扩展到整个SD卡

enable vnc后就可以用vnc工具连接树莓派,输入树莓派地址 ,username pi , passwd raspberry

 就能访问树莓派图形化界面了

参考:https://jingyan.baidu.com/article/4853e1e569d97c1908f72654.html


                       

猜你喜欢

转载自blog.csdn.net/caijiwyj/article/details/82665329
今日推荐