I am attempting to download a file from a hidden service using curl. I downloaded the Tor client and launched it and from another terminal executed this:
curl --socks5 socks5://127.0.0.1:9050 https://check.torproject.org > /tmp/output.txt
After listing the contents of tmp I catted the file along with grepping for 'browser'. I found congratulations this browser is configured to use Tor. However when I attempt to connect to a hidden service it fails to resolve the hostname which i checked within Tor browser and it loads. I tried using
--socks5-hostname localhost:9050 and it downloaded the page just fine from the hidden service. Why is this?