
Indicates that Tor should process the missing torrc file as if it were empty. The contents of this file are overwritten with the usual configuration files and options from the command line (by default /etc/tor/torrc-defaults). Specifies the file in which to search for default values for the Tor options. By default, /etc/tor/torrc or, if this file is not found, then $HOME/.torrc).ĭo not require the configuration file specified by the -f option to exist if you can access the default torrc). If you specify - (dash), then the options will be read from standard input. Specifies a new configuration file containing further Tor configuration options. The launch depends on the tor username on the system: These options can be specified when the service starts via the tor file.Ĭhecking the Tor configuration file for correctness. Next, consider a few options related to configuration files. But in practice, this file does not even come with the Tor package. The idea is that it should contain default options that can be overwritten with /etc/tor/torrc or $HOME/.torrc. There is another configuration file with default settings: /etc/tor/torrc-defaults. If there is no such file either, then Tor will simply continue to launch. If the file /etc/tor/torrc is not found, an attempt will be made to find the file $HOME/.torrc. For this reason, the file is optional – if it is missing, the Tor service will still start.

Tor has default configuration for all settings. This file contains only comments, that is, by default it does not set any settings. The main configuration file for the Tor service is /etc/tor/torrc. When everything is ready for traffic exchange with the Internet through the Tor network, it will display: Lines containing the word Bootstrapped indicate the progress of connecting to the Tor network. For this reason, sudo is used with the -u option, followed by the name of the user on whose behalf the command is executed.Įxample of running tor without demonization: But for the service to work, it needs files and directories (/var/lib/tor) the permissions to which are closed to all users (even root) and which belong to the debian-tor or tor user (the username depends on the distribution).

In fact, tor does not require superuser privileges.

On Arch Linux, BlackArch, and derivatives, the startup is done like this: If you want the Tor service not to go into the background, for example, for debugging, and so that it can be closed with CTRL+c, then start the Tor service as follows in Debian and its derivatives: The tor launch methods shown above turn it into a daemon – that is, a process that runs in the background and is detached from the console.

How to start the tor service without switching to the background
