linux终端中文显示问题修复

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
[talen@tp-arch-tianfei nginx]$ ls
'Mastering Nginx.pdf'
'Nginx 1 Web Server Implementation Cookbook.pdf'
'Nginx Essentials.pdf'
'Nginx From Beginner to Pro.pdf'
'Nginx HTTP Server, Third Edition.pdf'
'Nginx Module Extension.pdf'
'Nginx'$'\346\225\231\347\250\213\344\273\216\345\205\245\351\227\250\345\210\260\347\262\276\351\200\232''('$'\350\277\220\347\273\264\347\224\237\345\255\230\346\227\266\351\227\264''TTLSA'$'\345\207\272\345\223\201'').pdf'
nginx
nginx-kernel.txt
nginx-pdf
nginx.conf.info
nginx.dot
'nginx: See Active connections _ Connections Per Seconds.html'
nginx__try_files
nginx_architecture.png
nginx_conf.dot
nginx_setup.dot
'nginx'$'\347\254\254\344\270\211\346\226\271\346\250\241\345\235\227''.txt'
'nginx'$'\347\274\226\350\257\221\345\217\202\346\225\260''.txt'
''$'\345\206\263\346\210\230''Nginx'$'\357\274\232'' '$'\347\263\273\347\273\237\345\215\267'' - '$'\351\253\230\346\200\247\350\203\275''Web'$'\346\234\215\345\212\241\345\231\250\350\257\246\350\247\243\344\270\216\350\277\220\347\273\264''(jb51.net).pdf'
''$'\345\256\236\346\210\230''Nginx_'$'\345\217\226\344\273\243''Apache'$'\347\232\204\351\253\230\346\200\247\350\203\275''Web'$'\346\234\215\345\212\241\345\231\250''.'$'\345\274\240\345\256\264''.'$'\346\211\253\346\217\217\347\211\210''.pdf'
''$'\345\256\236\346\210\230''nginx'
''$'\346\267\261\345\205\245\345\211\226\346\236\220''Nginx.pdf'
''$'\346\267\261\345\205\245\347\220\206\350\247\243''Nginx'$'\346\250\241\345\235\227\345\274\200\345\217\221\344\270\216\346\236\266\346\236\204\350\247\243\346\236\220''.pdf'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
[talen@tp-arch-tianfei nginx]$ locale
LANG=C
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=
[talen@tp-arch-tianfei nginx]$ locale -a
C
POSIX


[talen@tp-arch-tianfei nginx]$ sudo vim /etc/locale.gen
[talen@tp-arch-tianfei nginx]$ cat /etc/locale.gen |grep -v '#'
en_US.UTF-8 UTF-8
zh_CN.GBK GBK
zh_CN.UTF-8 UTF-8
[talen@tp-arch-tianfei nginx]$ sudo locale-gen
Generating locales...
en_US.UTF-8... done
zh_CN.GBK... done
zh_CN.UTF-8... done
Generation complete.
[talen@tp-arch-tianfei nginx]$ locale -a
C
POSIX
en_US.utf8
zh_CN.gbk
zh_CN.utf8

[talen@tp-arch-tianfei nginx]$ sudo localectl set-locale LANG=en_US.UTF-8
[talen@tp-arch-tianfei nginx]$ locale > ~/.config/locale.conf
[talen@tp-arch-tianfei nginx]$ sed -i 's/=.*/="en_US.UTF-8"/' ~/.config/locale.conf
[talen@tp-arch-tianfei ~]$ locale
LANG=C
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=
[talen@tp-arch-tianfei ~]$ LANG= source /etc/profile.d/locale.sh
[talen@tp-arch-tianfei ~]$ locale
LANG=C
LC_CTYPE=en_US.UTF-8
LC_NUMERIC=en_US.UTF-8
LC_TIME=en_US.UTF-8
LC_COLLATE=en_US.UTF-8
LC_MONETARY=en_US.UTF-8
LC_MESSAGES=en_US.UTF-8
LC_PAPER=en_US.UTF-8
LC_NAME=en_US.UTF-8
LC_ADDRESS=en_US.UTF-8
LC_TELEPHONE=en_US.UTF-8
LC_MEASUREMENT=en_US.UTF-8
LC_IDENTIFICATION=en_US.UTF-8
LC_ALL=

[talen@tp-arch-tianfei t.web]$ ls
apache http401认证请求.png 'http method1.png' http常见状态码.png http状态码.png tomcat
apache整合tomcat多实例多网站.png httpbase64.png 'http method.png' http报文.png http盲中继keep-alive挂起问题 代理与网关区别
http401认证请求 httpbase65.png http常用方法.png http报文内容 nginx 基本web服务器请求步骤
坚持原创技术分享,您的支持将鼓励我继续创作!