Home Tutorials How to Install Ubuntu on Raspberry Pi: A Complete Tutorial

How to Install Ubuntu on Raspberry Pi: A Complete Tutorial

Raspberry Pi, or in short the Pi board, is nowadays notably known and used to make DIY (Do It Yourself) personal mini-computer creating the kit. Lately, tons of IoT (Internet of Things) projects are running very smoothly based on the Raspberry Pi board. In the past, Raspberry Pi had been using only for undergraduate and school-level engineering projects. But since when the leading operating system Ubuntu has started building OS for Raspberry Pi board, the demand of Pi boards has risen at the place of skyscraping. Now, instead of having the Raspbian OS, most users use either Ubuntu Server or the subordinate of Ubuntu the Ubuntu Mate on the Raspberry pi board.

Raspberry Pi: A Foolproof Mini PC With Ubuntu


With 40 general-purpose input/output (GPIO) and EEPROM pins, the Raspberry Pi can handle a lot of tasks at a time. The latest Raspberry Pi comes with a 1.5GHz 64-bit quad-core processor and up to 4GB RAM. This microcontroller beast also supports LAN port, WIFI adapter, HDMI port, and both regular and type-C USB port. A perfect mini PC can easily be built with all these attractive features.

To run this hardware configuration properly, it is very much important to choose a stable and functional Operating System. Among all the alternative Operating Systems of Raspberry Pi, no doubt Ubuntu is a wise choice. Ubuntu Mate and Ubuntu server is the most chosen and used OS on Raspberry Pi.

In this post, we will see how to install Ubuntu as well as the Ubuntu Server and the subordinate of Ubuntu, the Ubuntu Mate, on the Raspberry Pi board.

raspberry-pi-4 ubuntu Installing Ubuntu Linux on Raspberry Pi


Before Raspberry Pi, Arduino boards were very much popular among microcontroller engineers for building projects. Arduino comes with a programmable integrated circuit (IC) where Raspberry Pi comes with a fully functional desktop environment. Arduino based projects are much more entry-level than building multi-functional complex projects. Installing Ubuntu on Pi boards is a wise decision because most of the IoT projects and servers are build on Ubuntu. And it’s also easy to handle.

Step 1: Downloading the Ubuntu Image File


To install Ubuntu on Pi board first, we need to download the Ubuntu image file from the official website of Ubuntu. You can choose either the Ubuntu Server or the Ubuntu Mate image. If you’re a system administrator, need to maintain a database, Server Cluster, or some other FTP system, I will definitely recommend you grab the Ubuntu Server image, otherwise for normal use as a mini PC Ubuntu Mate is perfect.

You may also get confused about which version should I get? 32 bit or 64 bit? I’m not going to give you any rookie advice, for Raspberry Pi 4, the 32bit version works well. But for other older Pi boards, the 64bit version works smoothly. So, If you have the Raspberry Pi 4 version, go for the 32bit version.

Download Ubuntu Image for Raspberry Pi

Step 2: Installing Etcher on Your System


Etcher is a software that can extract, burn, or open up an Os image or ISO file. As we are working with n Ubuntu Mate/Server image file, so we will use the Etcher tool to make our image file bootable. You can download the Debian package file from GitHub, or you may proceed with the repository PPA. If you’re doing all the tasks from a Windows Pc or MAC PC, you will find the installer packages on the official website of Etcher.

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 379CE192D401AB61
sudo apt update
sudo apt install balena-etcher-electron

Etcher Download For Linux

Step 3: Flashing Ubuntu OS for Raspberry Pi


When you’re done installing the Etcher, now you are ready to make a bootable file of Ubuntu to gear up your little horse. To create a flashable file for Raspberry Pi, let not the memory card become an issue, always take a class 10 SD memory card. Insert the SD card into your desktop and open Etcher. Now, follow the instructions, as shown in the figure below.

If your SD card is inserted properly, Etcher will automatically find your removable device, if it doesn’t make it manually. Then for the option, click on the Plus (+) icon and choose the directory where you have downloaded the Ubuntu image file. Now, if everything is Okay, hit on the Flash button. Based on your SD card class and your system configuration, it will take more or less 15 minutes.

Step 4: Enabling Overclocking of Raspberry Pi


If you are using the Raspberry pi 4 version, then you’ve got a CPU of 1.5GHz. Modern computers inspire users to multitask. If you think that you’ll be using the Raspberry Pi board for multifunctional work, then I recommend you to do a little engineering inside your Ubuntu Server/Mate image. Yes, we are going to see how to enable the overclocking of the Pi board. By allowing the overclocking, you can speed up your system up to 2.147 GHz.

Go to file manager and locate the SD card where you’ve created the booted image file. Now fond the system-boot folder. And inside the folder, open the config.txt file with your notepad. At the bottom of the text codes, add the following script commands, and save the file.

over_voltage=4
arm_freq=2000
gpu_freq=650

Step 5: Booting Up Your Raspberry Pi with Ubuntu Linux


Now get ready to Power up your Raspberry Pi board, make sure that you have a stable power supply. Insert the SD card inside your Raspberry Pi board. Connect the ethernet cable to get your OS updated. Connect your HDMI cable with your monitor. If you’re using a 7 inch Capacitive IPS LCD Display, then you might need to make a little change again inside your config.txt file to ensure that your HDMI cable is passing the signal smoothly. The script codes are given right below.

max_usb_current=1
hdmi_group=2
hdmi_mode=1
hdmi_mode=87
hdmi_cvt 1024 600 60 6 0 0 0

Okay, now its time to plug the power cable with your Raspberry Pi board. When the board is powered, it will automatically take you to the boot screen. The first boot time makes take 3 to 5 minutes. But once you’re done, you will be asked to enter a username and a password. For Ubuntu Mate and Ubuntu server, the default username and password are given below. You’ll get an option to change the username and password later.

Username: ubuntu
Password: ubuntu

Till this step, you are almost done installing the Ubuntu on your Raspberry Pi board. Hereafter the password generating function is over; you will see a floating command prompt. Here you will choose your operating system, whether you want to get Ubuntu Mate or the Ubuntu server. Follow the commands provided below as instructed.

  • To install the Ubuntu Mate desktop on Raspberry Pi
sudo apt install ubuntu-mate-desktop
  • To install the Ubuntu Server on Raspberry Pi
sudo apt install ubuntu

If you want to install the other variations of Ubuntu like Xubuntu, Lubuntu, or Kubuntu, you can replace the ubuntu part from your command line.

sudo apt install xubuntu 
sudo apt install lubuntu 
sudo apt install kubuntu

After all the installer files are downloaded and installed inside your machine, you will be asked to choose the display manager whether you want to use the gdm3 or lightdm. Here gdm stands for Gnome display manager and lightdm stands for light display manager. You can choose the default Ubuntu display manager, which is gdm3 and press Ok.

After you press all these actions, there is almost nothing in your hand. Let the Raspberry Pi board handle rest of the job. With internet connection form The LAN cable you connected, it will download and install almost everything you need to set up a full fresh PC. After a while, you will find that the installation process is over, and then you can reboot your Raspberry Pi system with Ubuntu. For Ubuntu Mate, you can reboot your system with the following command line written below.

sudo reboot
And for Ubuntu Server the reboot command is:
startx

Step 6: Setting up Secure Shell (SSH) for Ubuntu Server


If you have installed the Ubuntu Server, you need to set up the Secure Shell (SSH) for your Raspberry Pi board. You can enable the SSH from either the Ubuntu boot files or the Raspberry Pi board. To enable SSH form Ubuntu Server, follow the instructions.

You must not forget that we have edited the config.txt file to enable the overclocking of Raspberry Pi, we can enable the SSH in the same way before the installation process is started. In Linux, the SSH configuration file is located in the root directory. You will find the SSH file here:/etc/ssh/sshd_config. You can edit this file using nano notepad.

You can also enable the SSH using the terminal commands. To enable SSH, follow the terminal instructions.

sudo apt update
sudo apt upgrade
sudo apt install openssh-server
sudo service ssh enable
sudo service ssh start

Step 7: Maintenance of the Raspberry Pi Board


To keep your mini pc cool and calm, you can always use a cooling fan along with an attractive case. There are different types of Raspberry Pi cases available in the online market you can choose yours easily. You can also use an aluminum heat sink right over your CPU panel to bypass overheating.

Final Thoughts


Raspberry Pi board is the first choice of engineers to build any project or mini server. As the Raspberry Pi works smoothly with Ubuntu Mate, it can be a perfect computer learning kit for the kids. In this post, we have discussed the field of uses and usefulness of Raspberry Pi. We have also covered the area of how to get an instant PC with Ubuntu and Raspberry Pi.

Hey, if you are a Raspberry Pi user, you can share your experiences with us. If you find this post useful, you can also share this post on your social accounts. Feel free to write any comments about this post in the comment section.

NO COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here


Exit mobile version