Install Torsocks
apt-get install torsocks
if you haven't already enabled TOR, enable it via
systemctl enable --now tor
Surf in commandline via Torsocks
In my experience the only commandline browser that works together with torsocks is w3m. First install w3m:
apt-get install w3m
then you can start surfing via:
torsocks w3m address.onion