Modern versions of Ubuntu include a system-level background service known as “Location Services.” This service utilizes a framework called GeoClue to determine your physical geographical location by scanning nearby Wi-Fi networks and IP addresses, similar to how a smartphone operates without a GPS chip.
While this is convenient for automatically setting your time zone or giving the default Weather application your local forecast, many privacy-conscious Linux users prefer not to have their operating system constantly pinging Mozilla Location Services or other external databases to triangulate their exact coordinates.
If you prefer strict privacy over convenience, you can easily turn off Location Services globally.
How to Disable Location Services via Settings
The easiest way to stop this tracking is through the standard GNOME Settings menu:
- Click the system menu in the top-right corner of your screen (where the battery and network icons are).
- Select Settings from the drop-down menu.
- In the left-hand sidebar, click on Privacy (or Privacy & Security depending on your Ubuntu version).
- Click on Location Services in the right pane.
- Toggle the switch at the very top of the window to the Off position.
This instantly revokes access to the GeoClue daemon for all installed applications.
How to Permanently Mask the GeoClue Service
If you want to ensure that no application—even one running with elevated privileges—can ever accidentally start the location tracking service in the background, you can completely disable the daemon using systemd.
- Open your terminal application (
Ctrl+Alt+T). - First, stop the service if it is currently running:
sudo systemctl stop geoclue.service
- Next, use the
maskcommand to link the service to/dev/null, making it completely impossible to start:
sudo systemctl mask geoclue.service
With the service masked, your Ubuntu machine is physically incapable of triangulating your location via Wi-Fi scanning. You will now have to manually type in your city name if you wish to use weather or mapping applications.