How to Set System Locale on Ubuntu 24.04
Setting the system locale on Ubuntu 24.04 changes how your computer shows language, dates, and money.
The system locale acts like a regional setting, making sure menus and apps appear in the language you prefer and follow local date and currency rules.
For example, choosing `en_US.UTF-8` makes Ubuntu use English with US date and currency formats.
Adjusting this setting helps your Ubuntu 24.04 computer feel more comfortable and easier to use.
Go to Settings > Region & Language to choose your preferred language and formats. For terminal users, use `sudo localectl set-locale LANG=your_locale` after ensuring the necessary language packs are installed and generated with `sudo locale-gen`.
Introduction
Changing your system locale on Ubuntu tells your computer how to handle dates, numbers, and text for your region.
Check your current settings
First, open your terminal. Type the following command to see your current locale %📂%LNK0%%:
localectl
Look for the line that says LANG=. This shows your current language and region.
Search and install additional locales
If Ubuntu doesn’t have your language ready, you need to find and install its language pack before you can set the system locale. You can search for available language packs using the command `apt search language-pack-`. To install a specific language, like French, you’d use a command such as `sudo apt install language-pack-fr` to add the necessary files.
apt search language-pack-
Installing a French language pack on Ubuntu 24.04 updates the operating system's language settings. The command `sudo apt install language-pack-fr` adds French files to the Ubuntu 24.04 system, allowing users to change the displayed language on Ubuntu 24.04 to French.
sudo apt install language-pack-gnome-fr-base language-pack-fr
Ubuntu 24.04 system locale generation requires running the `locale-gen` command. This command creates the language and regional settings that the Ubuntu 24.04 operating system needs. This locale generation process ensures applications correctly display dates, numbers, and text for your chosen language.
sudo locale-gen fr_FR.UTF-8
Finally, check that it is ready to use by typing:
localectl list-locales
Change system locale
You can change the system locale on Ubuntu to your preferred language and region using a straightforward command. To set your system’s language to French, for example, you would run `sudo localectl set-locale LANG=fr_FR.UTF-8`. After running the command, you can check if the change worked by running `localectl` again.
sudo localectl set-locale LANG=fr_FR.UTF-8
localectl again. While a full system restart ensures these changes apply globally to every service, logging out of your user account and logging back in is usually sufficient to apply the changes to your personal user environment.Conclusion
Making sure your system locale is set correctly ensures your computer behaves as you expect.
How to set locale to UTF8?
To enable UTF-8 mode, use ". UTF8" as the code page when using setlocale . For example, setlocale(LC_ALL, ". UTF8") uses the current default Windows ANSI code page (ACP) for the locale and UTF-8 for the code page.
Where are locales stored in Ubuntu?
Adjusting Locales The default settings are stored in the /etc/default/locale file. This file can either be adjusted manually or updated using the tool, update-locale .
Was this guide helpful?
About the Author
Richard
Tech Writer, IT Professional
Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.
No comments yet — be the first to share your thoughts!