How to Install Pi-hole on Pop! OS

Pi-hole is a network-wide ad-blocking solution that can run on any device. In this tutorial, we will be installing Pi-hole on the latest version of Pop! OS.

Step 1: Update Your System

Before we start, let's make sure that the Pop! OS system is up-to-date. Open a terminal and run the following command:

sudo apt update && sudo apt upgrade

This will update your system to the latest packages.

Step 2: Install Required Dependencies

Pi-hole requires certain packages to be installed. To install them, run the following command:

sudo apt install git curl

Step 3: Install Pi-hole

To install Pi-hole on Pop! Os, we will be running a script from the Pi-hole website. Open a terminal and run the following command:

curl -sSL https://install.pi-hole.net | bash

This will start the installation process for Pi-hole. You will be prompted with a few questions during the installation process for the setup of Pi-hole.

The first question will ask you to select a network interface to be used by Pi-hole. Choose the interface that you want to use and press enter.

[✓] Your system supports systemd.
[✓] IPv6 is fully supported and enabled.
[✓] Installation of FTL will be attempted.
[✓] Using your new installation settings file.
:::
---
  [+] List existing dnsmasq.conf... not found!
::: 

  [i] Existing dnsmasq installation detected : 
  No dnsmasq.conf found; exiting
::: 

        ::: Installing detected OS distro release and version: 
        ::: Ubuntu 20.04 
        ::: Checking apt-get for installed packages...E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. 
ramana@pop-os:~/Downloads$ sudo dpkg --configure -a
[sudo] password for ramana: 
Setting up systemd-journal-remote (245.4-4ubuntu3.13) ...
Created symlink /etc/systemd/system/sockets.target.wants/systemd-journal-remote.socket → /lib/systemd/system/systemd-journal-remote.socket.

The next question will ask you to confirm the IP address that you want to use for Pi-hole. You can choose to use the default IP address or select a custom IP address.

::: 
  [i] Main IPv4 address detected: 192.168.0.183
  [i] Main IPv6 address detected: fe80::c8b:e963:7cd2:4480
:::
::: 
  [i] Umask for user 'pihole': 0022
:::
   [✓] Checking for existing repository clones.
::: Clone github repository [https://github.com/pi-hole/pi-hole.git] into /etc/.pihole...HEAD is now at 28e88b5 Merge pull request #3834

 :::
  [✓] Check for existing repository in /var/www/html/admin
  [i] Update repo in /var/www/html/admin
    :  OK
 ::: 
  [i] Main IPv4 address detected: 192.168.0.183
::: 
  [✓] LAN networking is supported.
  [✓] File /etc/pihole/setupVars.conf exists and contains variables.
::: 
  .;;,.
  .ccccc:,.
   :cccclll:.      ..,,
    :ccccclll.   ;ooodc
     'ccll:;ll .oooodc
       .;cll.;;looo:.
           .. ','.

 :::
 ::: Note: You are installing Pi-hole into an existing system with HTTPS, that script will have to remove this from your webserver configuration before to install.
::: 
If you would like to use both HTTPS and HTTP access (HTTPS strongly recommended) you should refer to the following Dispensing Capt video - https://www.youtube.com/watch?v=ZoeT93KpTc0 
::: 

The final question will ask you to select a DNS provider for Pi-hole. You can choose to use the default DNS provider or select a custom one.

::: 
  [✓] DNS service is listening
  [✓] UDP (IPv4)
  [✓] TCP (IPv4)
  [✓] UDP (IPv6)
  [✓] TCP (IPv6)
  [✓] Pi-hole blocking is enabled
::: 

Some commonly used DNS providers are shown below and selecting one will set the resolver to the IP address of that provider.

If you wish to use a custom DNS provider enter it here and press <ENTER>='': 

   1: Current resolver IP address ( default )
   2: Cloudflare (ECS)
   3: Google (ECS)
   4: OpenDNS (ECS)
   5: Quad9 (filtered, DNSSEC)
   6: Quad9 (unfiltered, no DNSSEC)
   7: Quad9 (filtered + ECS)
   8: Quad9 (unfiltered + ECS)
   9: Custom 

After answering all the questions, the installation process will start, and it may take a few minutes to complete.

Step 4: Accessing the Pi-hole Web Interface

Once the installation is complete, you can access the Pi-hole web interface by opening a web browser and going to http://pi.hole/admin.

You should now see the Pi-hole dashboard, where you can manage your settings, whitelist or blacklist domains and monitor the activity.

Conclusion

We have successfully installed Pi-hole on Pop! OS, which will now block ads network-wide. Enjoy your ad-free browsing!

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!