One Ubuntu machine can quietly remove ads and trackers for every phone, TV and laptop in your house. Pi-hole does it at the DNS level, before the ad is even downloaded. Here is the complete setup, done in the right order, with the honest limits stated plainly.
Every device in your home asks one question many times a minute: what is the address of this website? That question goes to a DNS server. Pi-hole becomes that server for your whole network, and when the question is about a known ad or tracking domain, it answers with a blank — so the ad never loads. This guide installs it on Ubuntu, gives it a permanent address, connects your router to it, and tells you honestly what it can and cannot do. Follow the order: address first, install second, router last.
Pi-hole must live at an address that never changes, because every device in the house will be told to ask it for DNS. If its address moves, the whole house loses name resolution. Set a static IP on the Ubuntu machine (or reserve its address in the router) before you install anything, and keep that address outside the range your router hands out automatically. The full reasoning and both methods are covered in the static IP case guide in this series.
Pi-hole is installed with the project's own automated installer, straight from pi-hole.net. First update the system packages:
sudo apt updatecurl -sSL https://install.pi-hole.net | bashThe installer checks your system, installs what Pi-hole needs, and then walks you through a few blue setup screens. Take them slowly — the next steps happen inside those screens.
Pi-hole blocks the bad questions, but the good ones still need a real answer. In the installer you pick an upstream DNS provider — names like Cloudflare, Google, Quad9 or OpenDNS are offered in the list. Any of them works; the practical difference is speed and the provider's own logging policy. Pi-hole asks them only for domains that are not on your blocklists, and caches the answers, so repeat questions are answered locally and instantly.
The installer offers a starting blocklist (the well-known Steven Black list). Leave it ticked — it is a sane, conservative starting point that blocks ads and trackers without breaking normal sites. Confirm the static IP details when asked, let the installation complete, and note the admin password shown at the end. That password protects the web dashboard; if you ever lose it, it can be reset from the terminal on the Ubuntu machine itself.
Installing Pi-hole changes nothing until devices actually use it. Log in to your router's settings, find the DHCP or LAN DNS setting, and set the DNS server to the Pi-hole machine's static address. From then on, every device that joins your network is automatically told to resolve names through Pi-hole. Renew a device's connection (or reboot it) and it picks up the new DNS. Setting the DNS on each device by hand also works and is covered in this series, but the router change is the one-time fix for the whole home.
Open a browser on a phone or laptop and load a few normal sites, then open the Pi-hole dashboard at http://pi.hole/admin (or the machine's address followed by /admin) from that device. You should see queries arriving live on the dashboard. That — not a successful install screen — is the proof the setup works: real devices, asking real questions, with the blocked ones quietly disappearing.
Ubuntu par Pi-hole install karne ka pura process — installer screens se lekar router setting tak, live step-by-step is video me dikhaya gaya hai.
▶️ Watch Full VideoPi-hole's automated installer supports current Ubuntu LTS releases, and the installer itself checks your system and tells you if something is unsupported. It also runs happily on very modest hardware — an old laptop or mini PC that can stay on all day is ideal, because the Pi-hole machine must be awake whenever the house is online.
No — and any guide promising that is not being straight with you. YouTube serves its ads from the same domains as its videos, so a DNS blocker cannot separate them. Blocking those domains would break YouTube itself. Pi-hole is excellent at network-wide ad and tracker domains everywhere else, but in-app and in-stream ads served from the content domain are outside what DNS blocking can do.
Devices that use Pi-hole as their only DNS server will fail to open websites by name until it comes back, because nobody is answering their questions. That is why this guide insists on a machine that stays on, and why the redundancy case guide in this series covers second-DNS and backup options honestly.