Home > Operation and Maintenance > Docker > What to do if ubuntu is garbled in docker

What to do if ubuntu is garbled in docker

藏色散人
Release: 2022-11-04 12:04:41
Original
2281 people have browsed it

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".

What to do if ubuntu is garbled in docker

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
Copy after login

2. Check the local supported language environment:

locale -a
Copy after login

3. Then add "export LANG=C.UTF-8" at the end of the "/etc/profile" file

Edit the file:

  vim /etc/profile
Copy after login

Add export LANG=C.UTF-8

at the end Reload:

 source /etc/profile
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template