On my linux i can run sudo journalctl -u tor@default to see tor log. where is the log file stored on the system. Maybe a unix.stakexchange kind of question but i opt to ask it here

  • Which distribution are you using? – Jens Kubieziel Sep 12 '18 at 11:32
  • @JensKubieziel kali-rolling – pouya Sep 12 '18 at 11:42

Usually Tor stores its log files in /var/log/tor. Depending from the specific settings you'll find /var/log/tor/notices.log, /var/log/tor/log, /var/log/tor/info.log, etc.

The option Log in torrc specifies where the log file is stored and what kind of information is logged. So if you don't find the above mentioned files please have a look into your configuration.

  • Nothing exists in /var/log/tor and all options related to logging is commented out in my /etc/tor/torrc file. Still journalctl manages to show me tor logs. I guess it is related to how tor service is configured on the system than the tor configuration itself. – pouya Sep 12 '18 at 7:51

By default stdout and stderr of a systemd unit are sent to syslog. On my machine(Kali distro) it is stored in /var/log/syslog. So to see tor unit output run

cat /var/log/syslog | grep tor -i


In case someone needs to monitor tor unit i found a better way. Adding -f or --follow flag to journalctl makes it to continuously print new entries as they are appended to the journal. You can then pipe it to a parser and react based on it.

In one of your termianl tabs run

sudo journalctl -f -u tor@default | grep bootstrapped -i

in another tab do

sudo systemctl restart tor

You will see the results are appended to the first terminal as they are appended to the systemd journal

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.