Hi,
how can I update Tor Browser from the command line on Linux (excluding torbrowser-launcher’s Flatpak version)? Reason being, I want to automate updating and also intend to built my own immutable distro image, which won’t allow running executables which don’t ship with the image, so updating via the gui won’t work.
Tor Browser updates itself on launch by default (like Firefox). You can launch it with ./start-tor-browser.desktop from the top level Tor Browser directory. If that doesn’t work for your needs you can always find and download the latest version with a script. This is an excerpt from a bash script I use which utilizes the Linux jq tool to parse the latest release version string. It then downloads and extracts the latest stable release (for amd64 architecture):
json=$(curl -s https://aus1.torproject.org/torbrowser/update_3/release/download-linux-x86_64.json)
tbb_version=$(echo "$json" | jq -r '.version')
archive=tor-browser-linux-x86_64-"$tbb_version".tar.xz
url=https://dist.torproject.org/torbrowser/"$tbb_version"/"$archive"
wget -q "$url"
tar -xf "$archive"