{"id":19109,"date":"2016-05-13T07:53:18","date_gmt":"2016-05-13T12:53:18","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=19109"},"modified":"2022-10-03T08:37:09","modified_gmt":"2022-10-03T13:37:09","slug":"how-to-set-up-system-locale-on-centos-7","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-set-up-system-locale-on-centos-7\/","title":{"rendered":"How to Set Up System Locale on CentOS 7"},"content":{"rendered":"
<\/p>\n
We’ll show you how to set up system locale on CentOS 7. System locale allows you to specify the language settings for the user interfaces and services running on your system.<\/p>\n
<\/p>\n
How can you change it in CentOS 7? In this tutorial, you will learn how to set up system-wide locale settings on a Linux VPS<\/a> running CentOS 7 as the operating system.<\/p>\n <\/p>\n First of all, let’s learn more about the system locale. The system-wide locale settings are stored in a file. The file is \/etc\/locale.conf and this file is read by the systemd daemon at system boot. All the settings specified in this file are inherited by the users on your system and the services running on your system. However, certain system users or services can easily override the specified system locale settings if needed.<\/p>\n Connect to your CentOS VPS via SSH<\/a> and update your system software to the latest version available before doing anything else. Issue the following command to do that:<\/p>\n The update process should take no longer than a few minutes to complete. Once it completes, run the following command to check the system locale specified on your server:<\/p>\n You should see something like the following:<\/p>\n You can check the system locale specified on your CentOS VPS<\/a> by reading the \/etc\/locale.conf file too:<\/p>\n If you want to set up a different system locale on your system you can do that by using the localectl command. First, list the available locales:<\/p>\n The list should be very long. If you want to filter the English locales you can do that using the command below:<\/p>\n You should get something like the following:<\/p>\n To set up a specific system locale to be a default one, you can use the localectl command:<\/p>\n The syntax is the following:<\/p>\n Of course, you need to replace locale_name with the default locale you like to set. For example, if you’d like to set en_GB.utf8 as a default system locale you can use the command below:<\/p>\n To check if everything is OK you can run the following command again:<\/p>\n Now, the output should be the same like the following:<\/p>\n Using localectl you can set up virtual console keyboard mappings on your system too. For more information about what options are available you can use the –help flag:<\/p>\n The output of the command above should be similar to the following one:<\/p>\n See Also: How to Set Up System Locale on Ubuntu 16.04<\/a><\/strong><\/p>\n Of course, you don\u2019t have to set up system locale on CentOS 7, if you use one of our\u00a0Managed CentOS VPS hosting services<\/a>, in which case you can simply ask our expert Linux admins to set up the system locale for you. They are available 24\u00d77 and will take care of your request immediately.<\/p>\n If you liked this post, on how to set up system locale on CentOS 7,\u00a0 please share it with your friends on social networks or simply leave a reply below. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":" We’ll show you how to set up system locale on CentOS 7. System locale allows you to specify the language … <\/p>\n# yum update<\/pre>\n
# localectl status<\/pre>\n
# localectl status\r\n System Locale: LANG=en_US.utf8\r\n VC Keymap: n\/a\r\n X11 Layout: n\/a\r\n<\/pre>\n
# cat \/etc\/locale.conf\r\nLANG=en_US.utf8<\/pre>\n
# localectl list-locales<\/pre>\n
# localectl list-locales | grep en_<\/pre>\n
# localectl list-locales | grep en_\r\nen_AG\r\nen_AG.utf8\r\nen_AU\r\nen_AU.iso88591\r\nen_AU.utf8\r\nen_BW\r\nen_BW.iso88591\r\nen_BW.utf8\r\nen_CA\r\nen_CA.iso88591\r\nen_CA.utf8\r\nen_DK\r\nen_DK.iso88591\r\nen_DK.utf8\r\nen_GB\r\nen_GB.iso88591\r\nen_GB.iso885915\r\nen_GB.utf8\r\nen_HK\r\n...<\/pre>\n
# localectl set-locale LANG=locale_name<\/pre>\n
# localectl set-locale LANG=en_GB.utf8<\/pre>\n
# localectl status<\/pre>\n
# localectl status\r\n System Locale: LANG=en_GB.utf8\r\n VC Keymap: n\/a\r\n X11 Layout: n\/a\r\n<\/pre>\n
# localectl --help<\/pre>\n
# localectl --help\r\nlocalectl [OPTIONS...] COMMAND ...\r\n\r\nQuery or change system locale and keyboard settings.\r\n\r\n -h --help Show this help\r\n --version Show package version\r\n --no-pager Do not pipe output into a pager\r\n --no-ask-password Do not prompt for password\r\n -H --host=[USER@]HOST Operate on remote host\r\n -M --machine=CONTAINER Operate on local container\r\n --no-convert Don't convert keyboard mappings\r\n\r\nCommands:\r\n status Show current locale settings\r\n set-locale LOCALE... Set system locale\r\n list-locales Show known locales\r\n set-keymap MAP [MAP] Set console and X11 keyboard mappings\r\n list-keymaps Show known virtual console keyboard mappings\r\n set-x11-keymap LAYOUT [MODEL [VARIANT [OPTIONS]]]\r\n Set X11 and console keyboard mappings\r\n list-x11-keymap-models Show known X11 keyboard mapping models\r\n list-x11-keymap-layouts Show known X11 keyboard mapping layouts\r\n list-x11-keymap-variants [LAYOUT]\r\n Show known X11 keyboard mapping variants\r\n list-x11-keymap-options Show known X11 keyboard mapping options<\/pre>\n
\n