1、系统安装
1.1、下载-mate镜像:https://ubuntu-mate.org/raspberry-pi/
下载SDFormatterv4:https://www.sdcard.org/downloads/formatter_4/
下载Win32DiskImager:https://sourceforge.net/projects/win32diskimager/
1.2、准备一张大于8GB的TF卡,使用SDFormatterv4格式化TF
1.3、用Win32DiskImager将ubuntu-mate镜像(ubuntu-mate-16.04-desktop-armhf-raspberry-pi.img)写入TF中
2、系统配置
2.1、修改文件系统大小
输入sudo fdisk /dev/mmcblk0
输入d 回车
输入2 回车
输入n 回车
输入p 回车
输入2 回车
输入 回车 回车 w 回车
然后重启系统后输入sudo resize2fs /dev/mmcblk0p2
再重启系统
2.2、设置网络文件共享
2.2.1、安装Samba
sudo apt-get install sambasudo apt-get install smbclient
2.2.2、配置Samba
sudo nano /etc/samba/smb.conf
在文件尾添加:
[share]comment=this is Linux share directorypath=/homeread only = nocreate mask = 0777directory mask = 0777guest ok = yes browseable = yes public=yeswritable=yes
保存Ctrl+o退出Ctrl+x
2.2.3、启动Samba服务:
sudo /etc/init.d/samba restart
在Windows下访问共享目录:
\\192.168.1.102\share
2.3、设置VNC远程控制
2.3.1、安装tightvncserver
sudo apt-get install tightvncserver
2.3.2、设置密码
vncpasswd
2.3.3、设置开机自启动
sudo nano /etc/init.d/tightvncserver
输入:
#!/bin/sh### BEGIN INIT INFO# Provides: tightvncserver# Required-Start: $local_fs# Required-Stop: $local_fs# Default-Start: 2 3 4 5# Default-Stop: 0 1 6# Short-Description: Start/stop tightvncserver### END INIT INFO # More details see:# http://www.penguintutor.com/linux/tightvnc ### Customize this entry# Set the USER variable to the name of the user to start tightvncserver underexport USER='pi'### End customization required eval cd ~$USER case "$1" in start) # 启动命令行。此处自定义分辨率、控制台号码或其它参数。 su $USER -c '/usr/bin/tightvncserver -depth 16 -geometry 960x600 :1' echo "Starting TightVNC server for $USER " ;; stop) # 终止命令行。此处控制台号码与启动一致。 su $USER -c '/usr/bin/tightvncserver -kill :1' echo "Tightvncserver stopped" ;; *) echo "Usage: /etc/init.d/tightvncserver {start|stop}" exit 1 ;;esacexit 0
保存Ctrl+o退出Ctrl+x
2.3.4、设置文件权限,更新开机自启动列表
sudo chmod 777 /etc/init.d/tightvncserversudo update-rc.d tightvncserver defaults
2.3.5、在Windows或 VNC客户端连接:192.168.1.102:5901即可
2.4、设置Windows远程桌面
2.4.1、安装xrdp
sudo apt-get install xrdp
2.4.2、Windows端使用mstsc.exe连接即可
2.5、安装输入法
2.5.1、安装ibus
sudo apt-get install ibussudo apt-get install ibus-pinyin
2.5.2、设置ibus输入法:系统设置->语言支持->键盘输入方式系统 改为 IBus
2.6、更新
首先替换软件源,原始的源速度很慢,
cp /etc/apt/sources.list /etc/apt/sources.list.bak
vi /sources.list,并将原来的文件删除,替换为如下内容:
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial main restricted universe multiversedeb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-updates main restricted universe multiversedeb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-security main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-security main restricted universe multiversedeb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-backports main restricted universe multiverse之后,再运行:
sudo apt-get updatesudo apt-get upgrade
sudo rpi-update