SebMa Asked: 2019-02-10 06:01:10 +0800 CST2019-02-10 06:01:10 +0800 CST 2019-02-10 06:01:10 +0800 CST /etc/locale.gen: No such file or directory, how can I add a new locale the right way [duplicate] 772 The file /etc/locale.gen does not exist on my Ubuntu 14.04 LTS, how can I add a new locale the right way ? locale 14.04 2 Answers Voted Dominik K 2019-02-10T06:54:55+08:002019-02-10T06:54:55+08:00 To add a new locale, you have to add it to /etc/locale.gen, save the file and run following command: sudo locale-gen But it is really strange, that this file is missing on your system. Add this for American-English: en_US.UTF-8 UTF-8 vipulgupta2048 2019-02-10T06:51:30+08:002019-02-10T06:51:30+08:00 /etc/locale.gen contains all local settings and system languages in a commented format. To add /etc/locale.gen the right way, run the command $ sudo apt install locale-gen --reinstall The output would be $ sudo apt install locales --reinstall Reading package lists... Done Building dependency tree Reading state information... Done Need to get 3,612 kB of archives. After this operation, 0 B of additional disk space will be used. Get:1 http://in.archive.ubuntu.com/ubuntu bionic/main amd64 locales all 2.27-3ubuntu1 [3,612 kB] Fetched 3,612 kB in 17s (213 kB/s) Preconfiguring packages ... (Reading database ... 264543 files and directories currently installed.) Preparing to unpack .../locales_2.27-3ubuntu1_all.deb ... Unpacking locales (2.27-3ubuntu1) over (2.27-3ubuntu1) ... Processing triggers for man-db (2.8.3-2ubuntu0.1) ... Setting up locales (2.27-3ubuntu1) ... Generating locales (this might take a while)... en_AG.UTF-8... done en_AU.UTF-8... done en_BW.UTF-8... done en_CA.UTF-8... done en_DK.UTF-8... done en_GB.UTF-8... done en_HK.UTF-8... done en_IE.UTF-8... done en_IL.UTF-8... done en_IN.UTF-8... done en_NG.UTF-8... done en_NZ.UTF-8... done en_PH.UTF-8... done en_SG.UTF-8... done en_US.UTF-8... done en_ZA.UTF-8... done en_ZM.UTF-8... done en_ZW.UTF-8... done Generation complete. For more information - https://renenyffenegger.ch/notes/Linux/locale
To add a new locale, you have to add it to /etc/locale.gen, save the file and run following command:
But it is really strange, that this file is missing on your system.
Add this for American-English:
/etc/locale.gen contains all local settings and system languages in a commented format.
To add
/etc/locale.gen
the right way, run the commandThe output would be
For more information - https://renenyffenegger.ch/notes/Linux/locale