When I start an ngrok client with ./ngrok tcp 22
it runs in the foreground and I can see the randoming generated forwarding URL, such as tcp://0.tcp.ngrok.io:
May be I'm a little too late in answering but would be glad if it is helpful for anyone visiting the question.
***Above answers are solutions to see/check the redirection URL. However to run ngrok in background, you could try using screen in linux . Incase you need help here a quick reference
Steps: 1. Just run the ngrok in screen and then detach. 2. Use the python script given by Gerard above to see the URL.
I have followed the same process and it works!