Why does the error "bash warning setlocale LC_CTYPE cannot change locale (en_US.UTF-8) No such file or directory" error occurs while switching to root?

Solution Verified - Updated -

Issue

  • Unable to login in system or switch to root user. Below error message occurs:
[test@localhost]$ su -
-bash: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8): No such file or directory

Environment

  • Red Hat Enterprise Linux 9
  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content