终端zsh中文乱码问题解决

6/20/2022 Terminal

# 终端zsh中文乱码问题解决

vi ~/.zshrc
# 添加下面2行到文件最后
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
# 然后执行
source ~/.zshrc
1
2
3
4
5
6

如果是bash,只需要把上面的~/.zshrc改为~/.bash_profile即可

参考:CSDN博客 (opens new window)

Last Updated: 1/22/2024, 8:56:53 AM