tor
Anonymize network traffic using the Tor network
TLDR
Connect to the Tor network
View Tor configuration
Check Tor status
Run as client only
Run as relay
Run as bridge
Run as a hidden service
SYNOPSIS
tor [options]
PARAMETERS
-h, --help
Display command synopsis and exit
--version
Print Tor version and exit
-f FILE, --torrc-file FILE
Use FILE as configuration instead of torrc
--defaults-torrc FILE
Use FILE as defaults-torrc
--torrc-files torrc1 torrc2 ...
Read multiple torrc files successively
-m SIZE, --MaxMemInQueues SIZE
Limit memory queues to SIZE MB
--quiet
Don't output normal startup messages
--runasdaemon [0|1]
Fork and daemonize after startup (Unix)
--pidfile FILE
Save PID to FILE
--verify-config
Validate configuration and exit
--list-fingerprint
Print relay fingerprint
--list-torrc-options
List all torrc options
--ignore-missing-torrc
Start despite missing torrc
--DataDirectory DIR
Store working data in DIR
--SocksPort [ADDRESS:]PORT
Set SOCKS proxy port (default 9050)
--ControlPort PORT
Enable control port on PORT (default 9051)
--Log level file|syslog
Set logging level and destination
DESCRIPTION
Tor (The Onion Router) is free software and open network that helps defy censorship, avoid surveillance, and protect privacy by routing traffic through thousands of volunteer-operated relays worldwide. Each relay peels off a layer of encryption, like layers of an onion, concealing the origin and destination of data.
The tor command launches the Tor process, configurable as a client (for anonymous browsing via SOCKS proxy on port 9050), relay, bridge (for censored regions), or exit node. Most settings come from torrc files (/etc/tor/torrc or ~/.tor/torrc), but command-line options override them. Tor supports circuit building, hidden services (.onion sites), pluggable transports, and a control port for runtime management.
Apps like Firefox with Tor Browser bundle it for easy use. Running relays strengthens the network but exit nodes risk seeing plaintext traffic, with legal implications. Bridges evade detection. Tor resists traffic analysis but isn't foolproof against advanced adversaries. Regularly update for security fixes.
CAVEATS
Tor anonymizes TCP traffic only; UDP/DNS leaks possible without proper setup. Exit nodes see unencrypted data. High CPU/memory use on relays. Blocked in some countries; use bridges. Not for high-bandwidth or real-time apps.
CONFIGURATION FILES
Main: /usr/local/etc/tor/torrc or /etc/tor/torrc. Command-line options override torrc directives. Use --dump-config to inspect effective config.
CONTROL PROTOCOL
Enable --ControlPort 9051 for tools like nyx or stem to query circuits, reload config, signal NEWNYM.
Configure HiddenServiceDir and HiddenServicePort in torrc for .onion sites.
HISTORY
Developed 2002 by Roger Dingledine, Nick Mathewson, Paul Syverson (US Naval Research Lab). First release 2004. Tor Project nonprofit founded 2006 for maintenance. Command evolves with versions; v0.4.8 (2024) adds security, performance.


