4

Maybe i don't understand about locales... But could You explain me:

If I set locale using localectl:

localectl set-locale LANG=en_US.UTF-8

I see in localectl output after this:

   System Locale: LANG=en_US.UTF-8
       VC Keymap: us
      X11 Layout: us

The system locale now is en_US.UTF-8

But in locale output I still see this:

LANG=ru_RU.UTF-8
LC_CTYPE=ru_RU.UTF-8
LC_NUMERIC="ru_RU.UTF-8"
LC_TIME="ru_RU.UTF-8"
LC_COLLATE=ru_RU.UTF-8
LC_MONETARY="ru_RU.UTF-8"
LC_MESSAGES="ru_RU.UTF-8"
LC_PAPER="ru_RU.UTF-8"
LC_NAME="ru_RU.UTF-8"
LC_ADDRESS="ru_RU.UTF-8"
LC_TELEPHONE="ru_RU.UTF-8"
LC_MEASUREMENT="ru_RU.UTF-8"
LC_IDENTIFICATION="ru_RU.UTF-8"
LC_ALL=

Is only one way to set user's locale - export it or add into .bash_profile file to save after rebooting?

Serg
  • 45
  • 1
  • 4

1 Answers1

4

You can do below:

Do below for global changes

/etc/default/locale – on Ubuntu/Debian
/etc/locale.conf – on CentOS/RHEL

For particular user, edit file ~/.bash_profile by adding:

LANG="<your selection>"
export LANG
asktyagi
  • 2,401
  • 1
  • 5
  • 19