24 C
Jaipur
Saturday, October 24, 2020

How to Install Ubuntu Server on a Raspberry Pi

Must read

World Series live stream 2020: how to watch Dodgers vs Rays game 3 anywhere now

In a matter of days, the year's shortened MLB season will crown a new champion, but who will it be? The 2020 World Series...

Skype is back, and wants to take on Zoom

The pandemic has seen demand for video conferencing software skyrocket as businesses use the technology to work from home and students use it for...

huawei: Huawei ekes out third-quarter revenue growth as US restrictions bite – Latest News

Huawei Technologies Co Ltd eked out a gain in third-quarter revenue as the impact of the COVID-19 pandemic added to supply-chain difficulties brought about...

MEE Audio launches new range of Bluetooth audio accessories

MEE Audio has released a new range of audio products at different price points. There’s a new ‘MEE Audio Connect

The Raspberry Pi is the best-known single-board computer. Initially, the scope of the Raspberry Pi project was targeted to the promotion of teaching of basic computer science in schools and in developing countries.

Its low cost, portability and very low power consumption, made the models far more popular than anticipated. From weather station to home automation, tinkerers built so many cool projects using Raspberry Pi.

The 4th generation of the Raspberry Pi, is equipped with features and processing power of a regular desktop computer. But this article is not about using RPi as desktop. Instead, I’ll show you how to install Ubuntu server on Raspberry Pi.

In this tutorial I will use a Raspberry Pi 4 and I will cover the following:

  • Installing Ubuntu Server on a microSD card
  • Setting up a wireless network connection on the Raspberry Pi
  • Accessing your Raspberry Pi via SSH

You’ll need the following things for this tutorial:

  • A micro SD card (8 GB or greater recommended)
  • A computer (running Linux, Windows or macOS) with a micro SD card reader
  • A Raspberry Pi 2, 3 or 4
  • Good internet connection
  • An HDMI cable for the Pi 2 & 3 and a micro HDMI cable for the Pi 4 (optional)
  • A USB keyboard set (optional)

Installing Ubuntu Server on a Raspberry Pi

Ubuntu Server Raspberry Pi

I have used Ubuntu for creating Raspberry Pi SD card in this tutorial but you may follow it on other Linux distributions, macOS and Windows as well. This is because the steps for preparing the SD card is the same with Raspberry Pi Imager tool.

The Raspberry Pi Imager tool downloads the image of your choice of Raspberry Pi OS automatically. This means that you need a good internet connection for downloading data around 1 GB.

Step 1: Prepare the SD Card with Raspberry Pi Imager

Make sure you have inserted the microSD card into your computer, and install the Raspberry Pi Imager at your computer.

You can download the Imager tool for your operating system from these links:

Despite I use Ubuntu, I won’t use the Debian package that is listed above, but I will install the snap package using the command line. This method can be applied to wider range of Linux distributions.

sudo snap install rpi-imager

Once you have installed Raspberry Pi Imager tool, find and open it and click on the “CHOOSE OS” menu.

Raspberry Pi Imager

Scroll across the menu and click on “Ubuntu” (Core and Server Images).

Raspberry Pi Imager Choose Ubuntu

From the available images, I choose the Ubuntu 20.04 LTS 64 bit. If you have a Raspberry Pi 2, you are limited to the 32bit image.

Important Note: If you use the latest Raspberry Pi 4 – 8 GB RAM model, you should choose the 64bit OS, otherwise you will be able to use 4 GB RAM only.

Raspberry Pi Imager Ubuntu Server

Select your microSD card from the “SD Card” menu, and click on “WRITE”after.

Raspberry Pi Imager Sd Card

If it shows some error, try writing it again. It will now download the Ubuntu server image and write it to the micro SD card.

It will notify you when the process is completed.

Ubuntu Server Installed Raspberry Pi

Step 2: Use Ubuntu server on Raspberry Pi (if you have dedicated monitor, keyboard and mouse)

Once the microSD card flashing is done, you are ready to use it if you have got a mouse, keyboard and a monitor got it.

Simply insert the micro SD card to the Raspberry Pi, plug in the monitor, keyboard and mouse. Now turn on your Raspberry Pi.

When prompted, use “ubuntu” for the password. Right after a successful login, Ubuntu will ask you to change the default password.

Enjoy your Ubuntu Server!

Step 2: Use Ubuntu server on Raspberry Pi (if you don’t have dedicated monitor)

It is okay if you don’t have a dedicated monitor to be used with Raspberry Pi. Who needs a monitor with a server when you can just ssh into it and use it the way you want?

With the SD card still inserted in the card reader, open the file manager and locate the “system-boot” partition on the card.

The file that you are looking for and need to edit is named network-config.

Ubuntu Server Pi Network Config

This process can be done on Windows and MacOS too. Edit the network-config file as already mentioned to add your Wi-Fi credentials.

Firstly, uncomment (remove the hashtag “#” at the beginning) from lines that are included in the rectangular box.

After that, replace myhomewifi with your Wi-Fi network name enclosed in quotation marks, such as “itsfoss” and the “S3kr1t” with the Wi-Fi password enclosed in quotation marks, such as “12345679”.

Ubuntu Server on Raspberry Pi WiFi setup

It may look like this:

wifis:
  wlan0:
    dhcp4: true
    optional: true
    access-points:
      "your wifi name":
      password: "your_wifi_password"

Save the file and insert the micro SD card into your Raspberry Pi. During the first boot, if your Raspberry Pi fails connect to the Wi-Fi network, simply reboot your device.

Step 3: Connect remotely to your Raspberry Pi via SSH

On Ubuntu and Mac OS, an SSH client is usually already installed. To connect remotely to your Raspberry Pi, you need to discover its IP address. Check the devices connected to your network and see which one is the Raspberry Pi.

Since I don’t have access to a Windows machine, you can access a comprehensive guide provided by Microsoft.

Open a terminal and run the following command:

ssh [email protected]_pi_ip_address

You will be asked to confirm the connection with the message:

Are you sure you want to continue connecting (yes/no/[fingerprint])?

Type “yes” and click the enter key.

Connecting to Ubuntu server running on Raspberry Pi via SSH

Changing the default password

When prompted, use “ubuntu” for the password as mentioned earlier. You’ll be asked to change the password of course.

Once done, you will be automatically logged out and you have to reconnect, using your new password.

Your Ubuntu server is up and running on a Raspberry Pi!

Conclusion

Installing Ubuntu Server on a Raspberry Pi is an easy process and it comes pre-configured at a great degree which the use a pleasant experience.

I have to say that among all the operating systems that I tried on my Raspberry Pi, Ubuntu Server was the easiest to install. I am not exaggerating. Check my guide on installing Arch Linux on Raspberry Pi for reference.

I hope this guide helped you in installing Ubuntu server on your Raspberry Pi as well. If you have questions or suggestions, please let me know in the comment section.

Source link

- Advertisement -

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

World Series live stream 2020: how to watch Dodgers vs Rays game 3 anywhere now

In a matter of days, the year's shortened MLB season will crown a new champion, but who will it be? The 2020 World Series...

Skype is back, and wants to take on Zoom

The pandemic has seen demand for video conferencing software skyrocket as businesses use the technology to work from home and students use it for...

huawei: Huawei ekes out third-quarter revenue growth as US restrictions bite – Latest News

Huawei Technologies Co Ltd eked out a gain in third-quarter revenue as the impact of the COVID-19 pandemic added to supply-chain difficulties brought about...

MEE Audio launches new range of Bluetooth audio accessories

MEE Audio has released a new range of audio products at different price points. There’s a new ‘MEE Audio Connect

Accenture along with SAP aims to take businesses into cloud-based open industry solutions

Accenture has announced it will be working side-by-side with SAP to help companies change their business operations with industry-specific solutions based on SAP’s...