
- Kali Linux Tutorial
- Kali Linux - Home
- Installation & Configuration
- Information Gathering Tools
- Vulnerability Analyses Tools
- Kali Linux - Wireless Attacks
- Website Penetration Testing
- Kali Linux - Exploitation Tools
- Kali Linux - Forensics Tools
- Kali Linux - Social Engineering
- Kali Linux - Stressing Tools
- Kali Linux - Sniffing & Spoofing
- Kali Linux - Password Cracking Tools
- Kali Linux - Maintaining Access
- Kali Linux - Reverse Engineering
- Kali Linux - Reporting Tools
- Kali Linux Useful Resources
- Kali Linux - Quick Guide
- Kali Linux - Useful Resources
- Kali Linux - Discussion
How to Change or Set System Locales in Linux
We often need to customise the operating system to become useful to our own preferences like the language we want to use the time zone we are in the type of currency which would become the default currency in the OS etc. In this article we will see how to customise these options which is known as locale.
Current locale
We can check the current locally by using the locale command as shown below. We get list of variables which can be reset to a different value as per our choice later
$ locale
Running the above code gives us the following result −
LANG=en_US.UTF-8 LANGUAGE=en_US LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL=
All Available locale
To get all the available locale we use the below command. It just displays the locale values.
$ locale -a
Running the above code gives us the following result −
C C.UTF-8 en_AG en_AG.utf8 en_AU.utf8 . . . en_IN en_IN.utf8 en_NG . . . en_ZM.utf8 en_ZW.utf8 POSIX
Details of a Specific Variable
The specific variable details can be obtained by using the variable name along with the –c and –k switch.
$ locale -c -k LC_TIME
Running the above code gives us the following result −
LC_TIME abday="Sun;Mon;Tue;Wed;Thu;Fri;Sat" day="Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday" abmon="Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec" mon="January;February;March;April;May;June;July;August;September;October;November;December" am_pm="AM;PM" d_t_fmt="%a %d %b %Y %r %Z" d_fmt="%m/%d/%Y" t_fmt="%r" t_fmt_ampm="%I:%M:%S %p" . . . . . . timezone="" date_fmt="%a %b %e %H:%M:%S %Z %Y" time-codeset="UTF-8"
Change locale
To change the value of a locale which is already set, we can edit the .bashrc profile of the use who needs the new locale.
$ sudo nano ~/.bashrc #And add the following lines at end LANG="en_IN.utf8" export LANG $ locale
Running the above code gives us the following result −
$ locale LANG=en_IN.utf8 LANGUAGE=en_US LC_CTYPE="en_IN.utf8" LC_NUMERIC="en_IN.utf8" . . .
- Related Articles
- How to change file or directory permission in Linux/Unix?
- How to find out linux operating system system is 32 bit or 64 bit
- How to Determine the File System Type in Linux (Ext2, Ext3 or Ext4)?
- How to flushes file system buffers in the Linux operating system?
- How to Improve Linux System Security
- How to prevent moment.js from loading locales with webpack?
- How to Change Terminal Output Color in Linux?
- How to mount usb drive in a linux system
- How to converts tabs to spaces in the Linux system?
- How to set Java Path in Linux OS?
- How to set JAVA_HOME for Java in Linux?
- How to Set Wget Connection Timeout in Linux?
- How to change the shell working directory in Linux?
- Linux System
- Learn How to Manage System Firewall using Iptables in Linux
