How to specify output language for only one command in terminal

Published: 日 23 一月 2022
By jlz

In Linux.

The language I set on my computers is Chinese since it's my native language. Some commands will read the environment variables to determine the proper output language, for example, date. But sometimes I want it not to output Chinese. Searched a bit and found this.

The solution is simple:

LC_ALL=en_CA.UTF-8 date

If you want to find out all locales supported by your system:

locale -a

links

social