树莓派0 ubuntu无显示器ssh登录终端

在此记录倒腾树莓派的过程

一、本文前提

已经装好系统,我装的是官方的Raspbian系统,以下是系统下载地址和工具地址 (默认帐号:pi,默认密码:raspberry)

镜像下载: http://downloads.raspberrypi.org/
烧写工具win32diskimage : http://sourceforge.net/projects/win32diskimager/files/Archive/win32diskimager-v0.9-binary.zip/download

二、ssh登录

针对ubuntu已连接wifi的环境,树莓派和ubuntu用一根通用网线连接

1、首先在sd卡上新建一个ssh文件,否则即使找到ip也连接失败

2、sudo ifconfig eth0 10.42.0.1 netmask 255.255.255.0

    此时电脑就有连上了有线的标志

3、然后设置该有线连接,配置IPV4为与其他计算机共享,

4、开启树莓派,(开机自动获取ip)

5、ubuntu 终端 arp能够查询到设备eth0上新增的ip

该ip即为树莓派的ip地址

ssh pi@xxxx(rpi_ip)

三、raspi_config

四、软件源

sudo nano /etc/apt/sources.list

  1. deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ wheezy main non-free contrib  
  2. deb-src http://mirrors.ustc.edu.cn/raspbian/raspbian/ wheezy main non-free contrib 

老版用wheezy,新版用jessie

五、下载vim

sudo apt-get install vim

六、unbuntu vnc控制

https://www.embbnux.com/2014/03/24/on_ubuntu_use_vnc_connect_raspberry/

树莓派端:

  启动 : vncserver :2 -geometry 800x600 -depth 24 -dpi 96

  终止:tightvncserver -kill :1

  查询后台:ps ax | grep Xtightvnc | grep -v grep

ubuntu端

下载vnc_viewr : https://www.realvnc.com/en/download/viewer/linux/

原文地址:https://www.cnblogs.com/chencesc/p/7273973.html