The Unnecessary Location Daemon
The gpsd (GPS Daemon) service is a background utility in Ubuntu designed to interface with physical GPS receivers connected via USB, serial port, or Bluetooth. When a GPS device is attached, gpsd reads the location data and broadcasts it to other applications on the system (like navigation software or wardriving tools) via a standardized local network port (port 2947).
While essential for a laptop mounted in a vehicle or a mobile penetration testing rig, gpsd is entirely useless on a stationary desktop PC or a server sitting in a data center. If your machine does not have a physical GPS receiver attached to it, leaving the daemon running simply wastes a tiny amount of memory and needlessly opens a local port. Disabling it is a good practice for hardening and optimizing a stationary system.
How to Disable the GPS Daemon
You can stop the location service using systemctl.
Warning: Do not do this if you rely on a connected GPS dongle for time synchronization (NTP) or location services.
- Open your Ubuntu Terminal or connect via SSH.
- Stop the socket that activates the daemon when connections are attempted:
sudo systemctl stop gpsd.socket
- Stop the daemon itself:
sudo systemctl stop gpsd.service
- Disable both so they do not initialize on the next system boot:
sudo systemctl disable gpsd.socket
sudo systemctl disable gpsd.service
Your Ubuntu machine is now free of the GPS parsing daemon, ensuring a slightly leaner boot process and a more secure local network interface.