在树莓派上安装 Ubuntu MATE
树莓派 MATE

> 
> 这篇快速指南告诉你如何在树莓派设备上安装 Ubuntu MATE。
> 
> 
> 


![](/data/attachment/album/201905/05/134041z07xi6pexyqsc7w3.jpg)


[树莓派](https://www.raspberrypi.org/) 是目前最流行的单板机并且是创客首选的板子。[Raspbian](https://www.raspberrypi.org/downloads/) 是基于 Debian 的树莓派官方操作系统。它是轻量级的，内置了教育工具和能在大部分场景下完成工作的工具。


[安装 Raspbian](https://itsfoss.com/tutorial-how-to-install-raspberry-pi-os-raspbian-wheezy/) 安装同样简单，但是与 [Debian](https://www.debian.org/) 随同带来的问题是慢的升级周期和旧的软件包。


在树莓派上运行 Ubuntu 可以给你带来一个更丰富的体验和最新的软件。当在你的树莓派上运行 Ubuntu 时我们有几个选择。


1. [Ubuntu MATE](https://ubuntu-mate.org/) ：Ubuntu MATE 是仅有的原生支持树莓派且包含一个完整的桌面环境的发行版。
2. [Ubuntu Server 18.04](https://wiki.ubuntu.com/ARM/RaspberryPi#Recovering_a_system_using_the_generic_kernel) + 手动安装一个桌面环境。
3. 使用 [Ubuntu Pi Flavor Maker](https://ubuntu-pi-flavour-maker.org/download/) 社区构建的镜像，这些镜像只支持树莓派 2B 和 3B 的变种，并且**不能**更新到最新的 LTS 发布版。


第一个选择安装是最简单和快速的，而第二个选择给了你自由选择安装桌面环境的机会。我推荐选择前两个中的任一个。


这里是一些磁盘镜像下载链接。在这篇文章里我只会提及 Ubuntu MATE 的安装。


### 在树莓派上安装 Ubuntu MATE


去 Ubuntu MATE 的下载页面获取推荐的镜像。


![](/data/attachment/album/201905/05/134051yum5tbnugvafmmgc.jpg)


试验性的 ARM64 版本只应在你需要在树莓派服务器上运行像 MongoDB 这样的 64 位应用时使用。


* [下载为树莓派准备的 Ubuntu MATE](https://ubuntu-mate.org/download/)


#### 第 1 步：设置 SD 卡


镜像文件一旦下载完成后需要解压。你可以简单的右击来提取它。


也可以使用下面命令做同样的事。



```
xz -d ubuntu-mate***.img.xz
```

如果你在 Windows 上你可以使用 [7-zip](https://www.7-zip.org/download.html) 替代。


安装 [Balena Etcher](https://www.balena.io/etcher/)，我们将使用这个工具将镜像写入 SD 卡。确保你的 SD 卡有至少 8 GB 的容量。


启动 Etcher，选择镜像文件和 SD 卡。


![](/data/attachment/album/201905/05/134051dqwcy0q0wosezgq3.png)


一旦进度完成 SD 卡就准备好了。


#### 第 2 步：设置树莓派


你可能已经知道你需要一些外设才能使用树莓派，例如鼠标、键盘、HDMI 线等等。你同样可以[不用键盘和鼠标安装树莓派](https://linuxhandbook.com/raspberry-pi-headless-setup/)，但是这篇指南不是那样。


* 插入一个鼠标和一个键盘。
* 连接 HDMI 线缆。
* 插入 SD 卡 到 SD 卡槽。


插入电源线给它供电。确保你有一个好的电源供应（5V、3A 至少）。一个不好的电源供应可能降低性能。


#### Ubuntu MATE 安装


一旦你给树莓派供电，你将遇到非常熟悉的 Ubuntu 安装过程。在这里的安装过程相当直接。


![选择你的键盘布局](/data/attachment/album/201905/05/134055h4yo1bddu6d4dk4z.jpg)


![选择你的时区](/data/attachment/album/201905/05/134055kc2tyc9p44i4ueh9.jpg)


选择你的 WiFi 网络并且在网络连接中输入密码。


![添加用户名和密码](/data/attachment/album/201905/05/134057kwbdwtpqbnrbl7rr.jpg)


在设置了键盘布局、时区和用户凭证后，在几分钟后你将被带到登录界面。瞧！你快要完成了。


![](/data/attachment/album/201905/05/134059k35qzzkdz131ttl0.jpg)


一旦登录，第一件事你应该做的是[更新 Ubuntu](https://itsfoss.com/update-ubuntu/)。你应该使用下列命令。



```
sudo apt update
sudo apt upgrade
```

你同样可以使用软件更新器。


![](/data/attachment/album/201905/05/134102s2u6gduzmbdkx525.png)


一旦更新完成安装你就可以开始了。你可以根据你的需要继续安装树莓派平台为 GPIO 和其他 I/O 准备的特定软件包。


是什么让你考虑在 Raspberry 上安装 Ubuntu，你对 Raspbian 的体验如何呢？请在下方评论来让我知道。




---


via: <https://itsfoss.com/ubuntu-mate-raspberry-pi/>


作者：[Chinmay](https://itsfoss.com/author/chinmay/) 选题：[lujun9972](https://github.com/lujun9972) 译者：[warmfrog](https://github.com/warmfrog) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
![Warp Terminal](/assets/images/warp-terminal.webp)


![Warp Terminal](/assets/images/warp-terminal.webp)

[Raspberry Pi](https://www.raspberrypi.org/?ref=itsfoss.com) is by far the most popular SBC (Single Board Computer) and the go-to board for makers. [Raspbian](https://www.raspberrypi.org/downloads/?ref=itsfoss.com) which is based on Debian is the official operating system for the Pi. It is lightweight, comes bundled with educational tools and gets the job done for most scenarios.

[Installing Raspbian](https://itsfoss.com/tutorial-how-to-install-raspberry-pi-os-raspbian-wheezy/) is easy as well but the problem with [Debian](https://www.debian.org/?ref=itsfoss.com) is its slow upgrade cycles and older packages.

There is a [huge list of Raspberry Pi OS ](https://itsfoss.com/raspberry-pi-os/)and Ubuntu is one of them. Running Ubuntu on the Raspberry Pi gives you a richer experience and up to date software. We have a few options when it comes to running Ubuntu on your Pi.

[Ubuntu MATE](https://ubuntu-mate.org/?ref=itsfoss.com): Ubuntu MATE is the only distribution which natively supports the Raspberry Pi with a complete desktop environment.[Ubuntu Server 18.04](https://wiki.ubuntu.com/ARM/RaspberryPi?ref=itsfoss.com#Recovering_a_system_using_the_generic_kernel)+ Installing a desktop environment manually.- Using Images built by the
[Ubuntu Pi Flavor Maker](https://ubuntu-pi-flavour-maker.org/download/?ref=itsfoss.com)community,and are*these images only support the Raspberry Pi 2B and 3B variants***not**updated to the latest LTS release.

The first option is the easiest and the quickest to set up while the second option gives you the freedom to install the desktop environment of your choice. I recommend going with either of the first two options.

Here are the links to download the Disc Images. In this article I’ll be covering Ubuntu MATE installation only.

## Installing Ubuntu MATE on Raspberry Pi

Go to the download page of Ubuntu MATE and get the recommended images.

![Ubuntu MATE on Raspberry PI Download Image](https://itsfoss.com/content/images/wordpress/2019/04/ubuntu-mate-raspberry-pi-download.jpg)

The experimental ARM64 version should only be used if you need to run 64-bit only applications like MongoDB on a Raspberry Pi server.

### Step 1: Setting Up the SD Card

The image file needs to be decompressed once downloaded. You can simply right click on it to extract it.

Alternatively, the following command will do the job.

`xz -d ubuntu-mate***.img.xz`


Alternatively, you can use [7-zip](https://www.7-zip.org/download.html?ref=itsfoss.com) if you are on Windows.

Install [Balena Etcher](https://etcher.balena.io/). We’ll use this tool to write the image to the SD card. Make sure that your SD card is at least 8 GB capacity.

Launch [Etcher](https://itsfoss.com/install-etcher-linux/) and select the image file and your SD card.

![burn Ubuntu MATE ISO](https://itsfoss.com/content/images/wordpress/2019/04/Screenshot-from-2019-04-08-01-36-16.png)

Once the flashing process is complete the SD card is ready.

### Step 2: Setting Up the Raspberry Pi

You probably already know that you need a few things to get started with Raspberry Pi such as a mouse, keyboard, HDMI cable etc. You can also [install Raspberry Pi headlessly without keyboard and mouse](https://linuxhandbook.com/raspberry-pi-headless-setup/?ref=itsfoss.com) but this tutorial is not about that.

- Plug in a mouse and a keyboard.
- Connect the HDMI cable.
- Insert the SD card into the SD card slot.

Power it on by plugging in the power cable. Make sure you have a good power supply (5V, 3A minimum). A bad power supply can reduce the performance.

### Ubuntu MATE installation

Once you power on the Raspberry Pi, you’ll be greeted with a very familiar Ubuntu installation process. The process is pretty much straight forward from here.

![ubuntu-select-keyboard-layout](https://itsfoss.com/content/images/wordpress/2019/04/Keyboard-layout-ubuntu.jpg?fit=800%2C467&ssl=1)

![ubuntu-select-timezone](https://itsfoss.com/content/images/wordpress/2019/04/select-time-zone-ubuntu.jpg?fit=800%2C468&ssl=1)

Select your WiFi network and enter the password in the network connection screen.

![Ubuntu-add-credentials](https://itsfoss.com/content/images/wordpress/2019/04/Credentials-ubuntu.jpg?fit=800%2C469&ssl=1)

After setting the keyboard layout, timezone and user credentials you’ll be taken to the login screen after a few minutes. And voila! you are almost done.

![ubuntu-MATE-desktpo](https://itsfoss.com/content/images/wordpress/2019/04/Desktop-ubuntu.jpg?fit=800%2C600&ssl=1)

Once logged in, the first thing you should do is to [update Ubuntu](https://itsfoss.com/update-ubuntu/). You can use the command line for that.

```
sudo apt update
sudo apt upgrade
```


You can also use the Software Updater.

![ubuntu-software-updater](https://itsfoss.com/content/images/wordpress/2019/04/update-software.png)

Once the updates are finished installing you are good to go. You can now go ahead and create [some awesome Raspberry Pi project](https://itsfoss.com/raspberry-pi-projects/).

What made you think about installing Ubuntu on the Raspberry and how has your experience been with Raspbian? Let me know in the comments below.