Ubuntu – How to automate ‘dpkg-reconfigure locales’ with one command

locale

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 ?

Best Answer

One command:

sudo update-locale LANG=en_HK.UTF-8

Easy day :)