24 C
Jaipur
Saturday, October 24, 2020

How to Install and Configure Raspberry Pi OS on Raspberry Pi 4 Without External Monitor – Linux Hint

Must read

2020 World Series live stream: how to watch Dodgers vs Rays game 4 from anywhere

Over the next few days,  the year's shortened MLB season will come to an end and baseball will crown a new champion - but...

Michigan vs Minnesota live stream: how to watch Big Ten college football tonight

Big Ten college football is back, and the Michigan Wolverines vs Minnesota Golden Gophers game - one of the oldest rivalries in American college...

How to watch Khabib vs Gaethje: live stream UFC 254 right now

It's Fight Island's final bout of the year, and what a clash to be ringing that final bell to. UFC 254 plays host to...

How to watch Khabib vs Gaethje: live stream UFC 254 right now

It's Fight Island's final bout of the year, and what a clash to be ringing that final bell to. UFC 254 plays host to...

Raspberry Pi OS is the official operating system of Raspberry Pi devices. Previously it was known as Raspbian. Raspberry Pi OS is based on Debian 10 Buster (as of this writing). Raspberry Pi OS is optimized specifically for Raspberry Pi devices. So, it runs flawlessly in any Raspberry Pi devices ever released. It is fast, stable, and it comes with all the development tools you need to build your projects using Raspberry Pi devices. It has a rich collection of software packages in the official Raspberry Pi OS package repository as well. If you need something, it is more likely to be in the official package repository of Raspberry Pi OS which you can easily install using the APT package manager. Raspberry Pi OS also comes with many tools for configuring the Raspberry Pi devices it’s running on. It is one of the best OS for Raspberry Pi devices.

In this article, I am going to show you how to install Raspberry Pi OS on Raspberry Pi 4 without using an external monitor. So, let’s get started.

Things You Will Need:

To try this article, you need the following things:

  1. A Raspberry Pi 4 single-board computer.
  2. A USB Type-C power adapter for Raspberry Pi 4.
  3. A 16GB or higher capacity microSD card.
  4. A card reader for flashing Raspberry Pi OS on the microSD card.
  5. A computer/laptop for flashing the microSD card.
  6. A keyboard and a mouse.
  7. A micro-HDMI to HDMI cable.
  8. Wi-Fi or wired network for connecting to the Raspberry Pi 4 remotely.

Downloading Raspberry Pi OS:

To download the Raspberry Pi OS image, visit the official Raspberry Pi OS download page from your favorite web browser.

Once the page loads, scroll down a little bit and you should find the download links of Raspberry Pi OS.

You will find 3 versions of Raspberry Pi OS:

Raspberry Pi OS (32-bit) with desktop and recommended software – This Raspberry Pi OS image will have most of the necessary software and libraries required for Raspberry Pi projects and the Raspberry Pi OS desktop environment preinstalled.

Raspberry Pi OS (32-bit) with desktop – This Raspberry Pi OS image will have only the bare minimum number of programs and the Raspberry Pi OS desktop environment preinstalled.

Raspberry Pi OS (32-bit) Lite – This is the minimal version of the Raspberry Pi OS. It does not have any Raspberry Pi OS desktop environment preinstalled. So, you will have to do your work from the command-line. A very limited number of command-line programs are preinstalled. This one requires a very little amount of RAM to run. So, you will be able to use almost all of the RAM of your Raspberry Pi for other programs.

To download your desired version of the Raspberry Pi OS, click on the Download ZIP button. I will use the Raspberry Pi OS (32-bit) with a desktop for the demonstration in this article.

Your browser should prompt you to save the Raspberry Pi OS image. Select a directory where you want to save it and click on Save.

Your browser should start downloading the Raspberry Pi OS image. It may take a while to complete.

Flashing Raspberry Pi OS Image to MicroSD Card:

Once the Raspberry Pi OS image is downloaded, you can flash it on a microSD card and boot your Raspberry Pi 4 from the microSD card.

For flashing the Raspberry Pi OS image on the microSD card, you can use many programs. In this article, I will use Balena Etcher or Etcher in short. You can download Etcher from the official website of Balena Etcher.

Visit the official website of Balena Etcher and you can download Etcher for your operating system from there.

If you need any assistance on installing Etcher on Linux, read my article Install Etcher on Linux.

Once you have Etcher installed on your computer, insert the microSD card on your computer and run Etcher.

Once Etcher starts, click on Flash from file as marked in the screenshot below.

A file picker window should be opened. Select the Raspberry Pi OS image that you have just downloaded and click on Open.

Click on Select target.

Check the microSD card from the list and click on Select as marked in the screenshot below.

Your microSD card should be selected. Click on Flash! to start flashing the Raspberry Pi OS image to the microSD card.

The Raspberry Pi OS image is being decompressed.

The Raspberry Pi OS image is being flashed to the microSD card. It may take a while to complete.

Once the Raspberry Pi OS image is flashed on to the microSD card, Etcher will check whether there are any data corruptions in the microSD card. This may take a while to complete.

At this point, the Raspberry Pi OS image should be flashed on the microSD card. You can close Etcher and eject the microSD card from your computer.

Configuring Wi-Fi Access:

NOTE: If you are going to use a wired network on your Raspberry Pi 4 for network connectivity, then you can skip this section.

As you won’t be using any external monitor, you have to configure the network before booting Raspberry Pi OS for the first time. Otherwise, you won’t be able to access it remotely.

To configure Wi-Fi access without booting Raspberry Pi OS, insert the microSD card you have just flashed on your computer. You should find a boot partition as you can see in the screenshot below.

In the boot partition, create a new file wpa_supplicant.conf and type in the following lines of codes in it.

country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid=“WIFI_SSID”
scan_ssid=1
psk=“WIFI_PASSWORD”
key_mgmt=WPA-PSK
}

NOTE: Make sure to change the SSID and PSK to the SSID and password of the Wi-Fi network you’re trying to connect. Also, change the 2 character country code from the US to your own country if you’re living outside the USA. To know your country code, check the Alpha-2 Code section of the table on Wikipedia.

Once you’re done, save the wpa_supplicant.conf file.

Enabling SSH Access:

Once you’ve configured the network, you must enable SSH access to your Raspberry Pi 4. Otherwise, you won’t be able to run any command, configure the Raspberry Pi 4 further, or work on your projects. It will be useless.

To enable SSH access without booting Raspberry Pi OS, insert the microSD card you have just flashed on your computer. You should find a boot partition as you can see in the screenshot below.

Create new file ssh (without any extension) in the boot partition as shown in the screenshot below.

Booting Raspberry Pi OS:

Insert the microSD card you have just flashed with the Raspberry Pi OS image to the microSD card slot of your Raspberry Pi 4. Then, connect the USB Type-C power cable to your Raspberry Pi 4 and power it on.

If you plan to use a wired network instead of Wi-Fi for network connectivity, make sure to plug in your network cable into the RJ45/Ethernet port of your Raspberry Pi 4 before powering it on.

Finding the IP Address of the Raspberry Pi 4:

Once your Raspberry Pi boots the Raspberry Pi OS from the microSD card, it should get an IP address assigned to its network interface (ethernet or wireless) via the DHCP server of your home network.

You can find the IP address of your Raspberry Pi 4 from the web management interface of your home router. In my case, the IP address is 192.168.0.105. It will be different for you. So, make sure to replace it with yours from now on.

If you don’t have access to the web management interface of your home network, then you can use any network scanner software to find the IP address of your Raspberry Pi 4.

Accessing Raspberry Pi 4 via SSH:

Once you know the IP address of your Raspberry Pi 4, you can access it remotely via SSH with the following command:

As you are connecting to your Raspberry Pi 4 via SSH for the first time, you have to confirm the fingerprint of your connection. To do that, type in yes and press <Enter>.

Type in the password of your Raspberry Pi 4 and press <Enter>. The default password is raspberry.

You should be logged in. Now, you can run any command you want on your Raspberry Pi 4 remotely.

Changing the Password of Raspberry Pi OS:

Keeping the default password raspberry for the login user pi is not very secure. For security purposes, you should change the default password of your Raspberry Pi OS.

To change the default password of your Raspberry Pi OS, SSH into your Raspberry Pi 4 and run the following command:

Type in your desired new password and press <Enter>.

Retype the new password and press <Enter>.

The password should be changed.

Enabling VNC Access:

VNC is a protocol for remotely accessing the desktop environment (in this case, the Raspberry Pi Desktop Environment) of your computer. So, that you can use your computer graphically from a remote computer.

If you want to remotely access the graphical desktop environment of Raspberry Pi OS, you should enable VNC access on your Raspberry Pi 4.

To enable VNC access, SSH into your Raspberry Pi 4 and start the raspi-config command-line program as follows:

Select Interfacing Options and press <Enter>.

Select VNC and press <Enter>.

Select <Yes> and press <Enter>.

VNC access should be enabled. Select <Ok> and press <Enter>.

Press <Esc> to exit out of the raspi-config program.

Connecting to the Raspberry Pi OS Desktop via VNC:

To connect to your Raspberry Pi 4 remotely via the VNC protocol, you need to have a VNC client program on your computer.

In this article, I will be using the VNC Viewer (VNC client) from RealVNC. You can download it for your operating system from the official website of RealVNC.

To connect to your Raspberry Pi 4 remotely via the VNC protocol, connect to the IP address of your Raspberry Pi 4 (192.168.0.105 in my case) from your desired VNC client program.

Click on Continue.

Type in pi as the username and the password of your Raspberry Pi 4. Check Remember password if you don’t want to be asked for the password every time you connect to your Raspberry Pi 4 via VNC.

Once you’re done, click on OK.

You should be connected to the Raspberry Pi OS desktop environment. Now, you can use the Raspberry Pi OS running on your Raspberry Pi 4 remotely.

Initial Configuration of Raspberry Pi OS Desktop:

As you’re using the Raspberry Pi OS graphical desktop environment for the first time, you have to do some initial configuration.

By default, the login username is pi and the login password is raspberry. Raspberry Pi OS warns you that it’s a security risk to keep the default password. Don’t worry, we will change it later. So, click on OK.

Click on Next.

Select your Country, Language, and Timezone from the dropdown menus. If you want to use the English language and the US keyboard layout, make sure to check the Use English language and Use US keyboard as marked in the screenshot below.

Once you’re done, click on Next.

Type in a new password for your Raspberry Pi OS and click on Next. This will change the default password from raspberry to your desired password.

NOTE: If you’ve already changed the default password from the command-line, then type in the same password here to keep it.

Click on Next.

As you have already configured the network, click on Skip.

You can update all the existing packages of your Raspberry Pi OS from here.

If you want to update all the existing packages of your Raspberry Pi OS, click on Next. Otherwise, click on Skip.

Once the initial configuration is complete, click on Restart to reboot your Raspberry Pi for the changes to take effect.

Now, you can use your Raspberry Pi 4 remotely from any computer in your home network. Have fun.

Conclusion:

In this article, I have shown you how to install and configure the Raspberry Pi OS (previously known as Raspbian) on your Raspberry Pi 4 device without using an external monitor. If you don’t have an external monitor, then this article should help you configure and run your Raspberry Pi 4 device in headless mode. You can access your Raspberry Pi 4 remotely via SSH or VNC and use it from any computer on your home network.

Source link

- Advertisement -

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

2020 World Series live stream: how to watch Dodgers vs Rays game 4 from anywhere

Over the next few days,  the year's shortened MLB season will come to an end and baseball will crown a new champion - but...

Michigan vs Minnesota live stream: how to watch Big Ten college football tonight

Big Ten college football is back, and the Michigan Wolverines vs Minnesota Golden Gophers game - one of the oldest rivalries in American college...

How to watch Khabib vs Gaethje: live stream UFC 254 right now

It's Fight Island's final bout of the year, and what a clash to be ringing that final bell to. UFC 254 plays host to...

How to watch Khabib vs Gaethje: live stream UFC 254 right now

It's Fight Island's final bout of the year, and what a clash to be ringing that final bell to. UFC 254 plays host to...

US sanctions Russian institute linked to dangerous malware – Latest News

Washington imposed sanctions on a Russian research institute tied to the development of a dangerous computer program capable of causing catastrophic industrial damage, a...