Ubuntu: How to automate 'dpkg-reconfigure locales' with one command?


In the console to input dpkg-reconfigure locales,a gui jump out ,i select en_HK.UTF-8 as my target ,click enter.

enter image description here

dpkg-reconfigure locales  Generating locales (this might take a while)...  en_HK.UTF-8... done  

How to automate the whole process into one command ?


One command:

sudo update-locale LANG=en_HK.UTF-8

Easy day :)


I would probably run:

sudo locale-gen --purge  

That regenerates all the locales for your installed languages.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »