Friday, December 3, 2021

How can I change Linux terminal messages in English


When installing Linux, you may have chosen the language preference as your native language. There is no problem doing this in the GUI, etc., but seeing error messages or command results displayed in a language other than English in a terminal emulator like PuTTY can be difficult to troubleshoot.

Here is how to modify language settings in Linux.

Step 1. Edit the /etc/bashrc

#vi /etc/bashrc (or vi /etc/bash.bashrc)
* If you are using Z shell, then vi /home/user/.zshrc.

If you don't know your shell, you can find your shell with the following command.
[rhel8~]$ echo $SHELL
/bin/bash

Step 2. Add the following line to change the language environment

export LANG=en_US.UTF-8

Step 3. Changes can be applied without rebooting by entering the command below.

#source ~/.bashrc


No comments: