Home > Article > Operation and Maintenance > What to do if ubuntu is garbled in docker
Solution to ubuntu garbled characters in docker: 1. Check the local language environment through "locale"; 2. Check the local supported language environment through the "locale -a" command; 3. In "/etc/ Profile" file, add "export .UTF-8" at the end; 4. Reload "source /etc/profile".
The operating environment of this tutorial: ubuntu18.04 system, Docker version 20.10.11, Dell G3 computer.
What should I do if ubuntu is garbled in docker?
Solving the problem of Chinese garbled characters in docker ubuntu
docker ubuntu18.04
Use cat to view Chinese Normal, use vim to view Chinese garbled characters.
To solve this problem, you need to modify the "/etc/profile" file.
1. Check the local language environment before modification:
locale
2. Check the local supported language environment:
locale -a
3. Then add "export LANG=C.UTF-8" at the end of the "/etc/profile" file
Edit the file:
vim /etc/profile
Add export LANG=C.UTF-8
at the end Reload:
source /etc/profile
4. Check the local language environment:
finished.
Recommended learning: "docker video tutorial"
The above is the detailed content of What to do if ubuntu is garbled in docker. For more information, please follow other related articles on the PHP Chinese website!