Updated: 28 September 2026 · Applies to: Translate Shell 0.9.7 on Ubuntu 24.04 and 26.04 and AlmaLinux and Rocky Linux 9 and 10 (EPEL); Argos Translate for offline use
You can translate text straight from a Linux terminal, which is handy for reading log messages, error texts or documentation in another language on a server without a browser. The best-known tool is Translate Shell (the trans command), which sends the text to an online translation service. For confidential text, use an offline tool that translates on your own machine.
Translate Shell
- Install it:
apt install translate-shell # Ubuntu dnf install epel-release && dnf install translate-shell # AlmaLinux, Rocky Linux
Debian 13 has no package; install it from the project's GitHub page, where it is a single script. - Translate a phrase (the target language is set with
:code):trans :de "good morning" trans -brief en:fr "server" # only the translation
We tested these on Ubuntu 24.04; they returned "Guten Morgen" and "serveur". - Translate a file or command output:
trans -brief :en file://message.txt journalctl -n 5 --no-pager | trans -brief :en
- List the language codes:
trans -R
Translate Shell uses Google Translate by default and can use other engines with -e (for example -e bing). Everything you translate is sent to that service, so do not use it for passwords, customer data or other private text.
Offline: Argos Translate
Argos Translate runs open-source translation models locally, so nothing leaves the server. It is large: on Ubuntu 24.04 the Python packages took 5.6 GB, mostly PyTorch, plus about 160 MB for each language pair. We tested the commands below there:
python3 -m venv ~/argos && . ~/argos/bin/activate pip install argostranslate argospm update argospm install translate-en_de argos-translate --from en --to de "Good morning" # prints: Guten Morgen
Quality is lower than online services for many language pairs, but good enough to understand a message. On a server with a GPU, a local large language model is another private option; see our private LLM installation service.
Official documentation: Translate Shell and Argos Translate on GitHub.