Raspberry Pi - (a) out of the box to light up some of the pit (no screen, no wlan, no direct mouse and keyboard)

. 0x00 preparation:

material:

  Raspberry Pi board 3b + 1 *, 1 * Power Adapter, cable 2 *, 1 * 16G SD card, the card reader 1 *

  Note that during installation, 3b + three fins attached, small fan connected to the wiring of

 

tool:

  

  

 

0x01. Pit 1, the latest version of the official website to do under the system,

Note several points:

  rasp 180313 is the first comprehensive support system 3b +

  I just tried this 180418, you can use the method to add a blank document open ssh ssh pi itself, after which specific version is not available to me did not measure, the situation at hand and I can toss all of a sudden by the same method Benpian

  190,418 is the latest version of the official website today, tried, you can not be the way to open a blank document ssh ssh

  -----

 Under good .img file system image with SD Card Formatter empty sd card with Win32DiskImager the .img write sd card. U disk write successfully reloaded, capacity is not displayed correctly, do not worry

 After loading is complete, open the root directory of U no new suffix ssh file

0x02.  Hole 2 , without the display on hand remember what to do this step opens at the root cmdline.txt one set at the beginning of adding the IP IP = 192.168.137.9 (depending on preference setting a network IP) and arranged with the back of the item spaces to separate 

  Open adapter settings, make sure that all adapters are either automatically get or do not use this section of the 137 , then the local connection sharing and set a static IP

 

 

 

 

 0x03.sd card insertion pi, Ben notes direct cable port, power, observed network connection local connection state is changed by this panel  removed -> being identified -> unrecognized network

    

 

这时候用 advance port scanner 扫描 192.168.137.1-254 之间的活跃IP,能看到包含下面结果

    

  可以直接右键用ssh连接   

      默认Username: pi Password: raspberry

  或者putty 或者 xshell 啥的自行发挥,总之现在是可以ssh上 192.168.137.9 

 

 往下阅读或者跳转到参考链接之前,请注意 坑3 

 往下阅读或者跳转到参考链接之前,请注意 坑3 

 往下阅读或者跳转到参考链接之前,请注意 坑3 

坑3 配置vi ,不配置的话对笔记本修改网络和源很不友好,所以配置源的时候,请参考 https://www.cnblogs.com/QG-whz/p/6670235.html 进行输入中配置,当然不用全盘接受,参看文末备注1

 然后参考:https://blog.csdn.net/weixin_42427878/article/details/80698911 进行 扩展系统、配置源 的操作(备注2),不要急着 sudo apt-get update,因为当前没联网,update木有用

 

0x04 现在假定你的手机还有蛮多的流量,200M大概就够了,或者有一个靠谱的wifi,接下来进行无线的配置,脱离有线

  

  切换目录 并使用 sudo vi wpa*.conf 编辑框选文件(这里可以参看:https://www.cnblogs.com/shubin/p/7746399.html 对配置的说明)

基本格式:
network={   ssid="yourHiddenSSID"   scan_ssid=1 #是否扫描不广播wifi   psk="Your_wifi_password"
  priority=2 #将你自己的手机wifi数字设定大一些 }

 多个wifi的话设定 priority 越大 连接优先级越高

保存后 sudo reboot 使重启生效

可以用 ifconfig wlan0

  

看到这个代表连接成功

然后

   应用更新源  sudo apt-get update

  安装并配置 vim

    1,sudo apt-get install vim  安装vim

    2, sudo vi  /etc/vim/vimrc.tiny

      修改  set compatible为set nocompatible        设置是否兼容
      添加  set backspace=2          设置 backspace可以删除任意字符

    3,重启终端

  在编辑模式下可以用    backspace     delete    删除了

之后只要你的手机或者wifi开着 随时可以连接你的 pi

=== 以下谨防引用失效。对原作者版权表示尊重 ===

 备注1  

  vi 下

  ① insert模式下,按方向键将产生A、B、C、D等字符,解决方案:

:set nocompatible

  ② insert模式下Backspace键无法删除字符,解决方案:

:set backspace=indent,eol,start

  不用写vimrc文件

 

备注2

输入命令sudo raspi-config

  选择Advanced Options选项

      选择Expand Filesystem

 几个国内源。

    中科大deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi 

    清华deb https://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi

    大连东软deb http://mirrors.neusoft.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi

    重庆大学deb http://mirrors.cqu.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi

    浙江大学deb http://mirrors.zju.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi

    阿里云deb http://mirrors.aliyun.com/raspbian/raspbian/ stretch main contrib non-free rpi 

    搜狐deb http://mirrors.sohu.com/raspbian/raspbian/ stretch main contrib non-free rpi 

   

     先输入指令sudo vi /etc/apt/sources.list 使用vi命令编辑sources.list,博主使用的是中科大的软件源,配置界面如下:

 

  当然 pi 主要不是界面,要界面操作的话可以继续安装vnc之类。

 =======

 参考链接:

https://www.cnblogs.com/QG-whz/p/6670235.html

https://blog.csdn.net/weixin_42427878/article/details/80698911

https://www.cnblogs.com/shubin/p/7746399.html 

http://shumeipai.nxez.com/2019/02/14/the-most-common-raspberry-pi-commands-and-what-they-do.html

 

Guess you like

Origin www.cnblogs.com/logicmind/p/11074727.html