Skip to main content

PIA Desktop: Command Line Interface Part 1 - Knowledgebase / Technical / Application Settings and Features / Application & Features - PIA Support Portal

PIA Desktop: Command Line Interface Part 1

Authors list

The Private Internet Access desktop client includes a command-line interface that can be used to control some functionality of the PIA client from scripts.

Invoking piactl


On Windows, specify the full path to piactl.exe or change into the PIA installation directory and invoke it.  For example:

"C:\Program Files\Private Internet Access\piactl.exe" --help
"C:\Program Files\Private Internet Access\piactl.exe" connect


cd "C:\Program Files\Private Internet Access"
piactl --help
piactl connect

We do not recommend adding the PIA installation directory to PATH on Windows, as this would also add the DLLs shipped by PIA to PATH.

piactl in example commands, substitute the full path on Windows as needed.

Mac and Linux

On Mac and Linux, piactl is symlinked into /usr/local/bin at installation time if possible, so normally piactl is sufficient from a command line.  For example:

piactl --help
piactl connect

This requires that:

  • There isn't already a file called piactl in /usr/local/bin 
  • /usr/local/bin is already in your PATH (PIA does not alter PATH
  • On Linux, the directory /usr/local/bin must already exist.

Otherwise, the full path to piactl can be used - on Mac: /Applications/Private Internet; on Linux: /opt/piavpn/bin/piactl.

Part 2 will cover the --help command to display usage information and Part 3 will cover all other commands.