Docs / Admin

Tailscale CLI

Tailscale ships with a built-in CLI that you can use to get information about your Tailscale+WireGuard® network and troubleshoot issues.

Using the CLI

The location of the CLI varies depending on your platform:


On Linux, the CLI is your primary interface to Tailscale. The tailscale binary is likely already in your $PATH, so commands can be run with:

tailscale <command>

On macOS, the CLI is bundled inside the Tailscale app. Run commands with:

/Applications/ <command>

If you frequently access the Tailscale CLI, you may find it convenient to add an alias to your .bashrc, .zshrc or shell config to make it easier.

alias tailscale="/Applications/"

On Windows, the CLI can be accessed by executing the .exe from the Command Prompt.

"c:\Program Files (x86)\Tailscale IPN\tailscale.exe" <command>

There is no CLI support for iOS and Android.

Command Reference


Up connects your device to Tailscale, and authenticates if needed.

tailscale up [flags]

Running tailscale up without any flags connects to Tailscale.

You can specify flags to configure Tailscale’s behavior. Flags are not persisted between runs; you must specify all flags each time.

To clear previously set flags like tags and routes, pass the flag with an empty argument:

# Connects with `tag:server`
tailscale up --advertise-tags=tag:server

# Connects and clears any tags
tailscale up --advertise-tags=

In Tailscale v1.8 or greater, if you forget to specify a flag you added before, the CLI will warn you and provide a copyable command that includes all existing flags.

Available flags:

  • --authkey=<key> Provide an auth key to automatically authenticate the node as your user account.
  • --advertise-routes=<ip> Expose physical subnet routes to your entire Tailscale network. Read our subnet documentation for more details.
  • --advertise-tags=<tags> Give tagged permissions to this device. You must be listed in "TagOwners" to be able to apply tags.
  • --accept-routes Accept subnet routes that other nodes advertise. Linux devices default to not accepting routes.
  • --shields-up Block incoming connections from other devices on your Tailscale network. Useful for personal devices that only make outgoing connections.


down disconnects from Tailscale. This command is the same as the “Disconnect” option on the macOS and Windows GUI clients.

tailscale down

When disconnected, you cannot reach devices over Tailscale. To reconnect, re-run tailscale up without any flags.


ip returns a device’s Tailscale IP address.

tailscale ip [flags] [<hostname>]

By default, this command returns both an 100.x.y.z IPv4 address and an IPv6 address for the current device. You can return only an IPv4 or IPv6 address by passing either the -4 or -6 flags.

$ tailscale ip -4

You can also find the Tailscale IP for other devices on your network by adding the device hostname after the command. For example:

$ tailscale ip raspberrypi

Available flags:

  • -4 Only return an IPv4 address
  • -6 Only return an IPv6 address


Ping tries to ping another device exclusively over Tailscale.

The regular ping command often works fine over Tailscale, but tailscale ping provides more details about the connection over Tailscale that can be helpful when troubleshooting connectivity.

tailscale ping <hostname-or-ip>

You can call tailscale ping using either a 100.x.y.z address or a machine name.


Log out disconnects from Tailscale and expires the current log in. The next time you run tailscale up, you’ll need to reauthenticate your device.

tailscale logout


Status shows the status of your connections to other Tailscale devices.

tailscale status

This command returns a table of information like so:

1           2         3           4         5   device-a  [email protected]   linux     active; direct <ip-port>, tx 1116 rx 1124   device-b  [email protected]   macOS     active; relay <relay-server>, tx 1351 rx 4262   device-c  [email protected]  windows   idle; tx 1214 rx 50   device-d  [email protected]       iOS       —

From left-to-right, these columns represent:

  • Column 1 is a Tailscale IP, which you can use to connect to the device
  • Column 2 is the machine name of the device. If you use MagicDNS, you can use this name to connect too.
  • Column 3 is the email address for the owner of the device.
  • Column 4 is the device OS.
  • Column 5 shows the current connection status.

Connection status (column 5) is shown using three terms:

  • active means traffic is currently being sent/received from this device. You’ll also see either (a) “direct” for peer-to-peer connections, along with the IP address used to connect or (b) “relay” for connections using a relay server along with a city code (nyc, fra, tok, syd) for the respective location.
  • idle means traffic is not currently being sent/received from this device.
  • means no traffic has ever been sent/received from this device.

active and idle connection statuses will also include tx/rx values indicating the number of bytes sent (tx) and received (rx) from this device.

You can filter this list down to only active connections by running tailscale status --active.

Running tailscale status with the --json flag will return a machine-readable JSON response.

tailscale status --json

Combine this with jq to automate data collection about your network. For example, the following command will count and sort which relay servers your Tailscale peers are connected to.

tailscale status --json | jq -r '.Peer[].Relay | select(.!="")' | sort | uniq -c | sort -nr


Netcheck provides a report on your current physical network conditions. This command is provided to help debug connection troubles.

tailscale netcheck

Netcheck will output a report like this:

* UDP: true
* IPv4: yes, <ip-address>
* IPv6: no
* MappingVariesByDestIP: false
* HairPinning: false
* PortMapping: false
* Nearest DERP: 1 (nyc)
* DERP latency:
- 1, nyc = 43.6ms
- 2, sfo = 67.4ms
- 3, sin = 202.5ms
- 4, fra = 91.9ms
- 5, syd = 218.5ms
  • UDP shows whether UDP traffic is enabled on the current network. If this is false, it’s unlikely Tailscale will be able to make point-to-point connections, and will instead rely on our encrypted TCP relays (DERP)
  • IPv4 and IPv6 show your network public IP addresses and support for both protocols.
  • MappingVariesByDestIP describes whether your device is behind a difficult NAT that varies the device’s IP address depending on the destination.
  • HairPinning describes whether your router can route connections from endpoints on your LAN back to your LAN using those endpoints' globally-mapped IPv4 addresses/ports.
  • PortMapping describes a list of which three port-mapping services exist on your router. Possible values are “UPnP”, “NAT-PMP”, and “PCP”.
  • DERP latency and Nearest DERP describe latency from our encrypted TCP relays (DERP). The lowest latency (“nearest”) server is used for traffic.

If any fields are blank, it means Tailscale wasn’t able to measure that network property.

All the information from tailscale netcheck is also available in the admin console, by clicking on a particular machine.


The bugreport command is available in Tailscale v1.8 and greater. If you don’t see this command, consider updating your Tailscale client.

Bugreport makes it easier to report bugs to the Tailscale team by marking diagnostic logs with indicators to make triage easier.

If you encounter a connectivity issue, run tailscale bugreport on the device experiencing the issue at the time you encounter it. This command will print a random identifier into diagnostic logs, which you can share with our team.

Identifiers look like this:

$ tailscale bugreport

This command shares no personally-identifiable information, and is unused unless you share the bug identifier with our team.

Last updated