This article explains how to install the latest Tor in Ubuntu 18.04, and using it as a proxy with various applications.
The instructions include steps for setting up Privoxy, in case you want to use Tor with an application that doesn’t support SOCKS5 proxies, manually setting up the proxy in case torsocks fails to launch an application, as well as configuring Tor to use country-specific exit nodes.