---
name: "gpsdctl"
section: "8"
platform: "linux"
package: "gpsd"
version: "3.27.5-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/gpsdctl"
---

# gpsdctl(8)

tool for sending commands to gpsd over its control socket

## NAME

gpsdctl - tool for sending commands to gpsd over its control socket

## SYNOPSIS

**gpsdctl** *action* *device*

## OPTIONS

**action**

may be *add* or *remove*. If no daemon instance is running when an *add* is requested, this program will launch one.

**device**

argument should be the pathname of a device. The device will be opened by **gpsd** to read sensor data.

## DESCRIPTION

This is a tool for sending an instance of **gpsd** commands over its control socket to add or remove devices from the daemon’s device list. It is not intended to be called by users, but rather by the Linux hotplug system and similar facilities.

## ENVIRONMENT

Two environment variables are interpreted.

**GPSD\_SOCKET**

sets the location of the control socket. If the effective user ID of this program is root then it usually defaults to */run/gpsd.sock*, although some systems may use the deprecated */var/run/gpsd.sock* instead. Non-root users will use */tmp/gpsd.sock*.

**GPSD\_OPTIONS**

may be a list of options to be passed to gpsd when this tool launches it. It defaults to an empty string.

## RETURN VALUES

**0**

on success.

**1**

if the action was unknown or the write to the control socket failed,

## SEE ALSO

[**gpsd**(8)](/gpsd/8.md), [**gpsctl**(1)](/gpsctl/1.md), [**gps**(1)](/gps/1.md), [**libgps**(3)](/libgps/3.md), [**libgpsmm**(3)](/libgpsmm/3.md), [**gpsprof**(1)](/gpsprof/1.md), [**gpsfake**(1)](/gpsfake/1.md).

## RESOURCES

**Project web site:**  \<https://gpsd.io/\>

## COPYING

This file is Copyright 2013 by the GPSD project\
 SPDX-License-Identifier: BSD-2-clause

## AUTHOR

Eric S. Raymond
