{"id":63931,"date":"2025-04-29T16:03:50","date_gmt":"2025-04-29T08:03:50","guid":{"rendered":"https:\/\/fwq.ai\/blog\/63931\/"},"modified":"2025-04-29T16:03:50","modified_gmt":"2025-04-29T08:03:50","slug":"ubuntu%e5%91%bd%e4%bb%a4%e8%a1%8c%e4%b8%ad%e6%96%87%e4%b9%b1%e7%a0%81%e6%80%8e%e4%b9%88%e8%a7%a3%e5%86%b3-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/63931\/","title":{"rendered":"ubuntu\u547d\u4ee4\u884c\u4e2d\u6587\u4e71\u7801\u600e\u4e48\u89e3\u51b3"},"content":{"rendered":"<blockquote><p>\n  ubuntu \u547d\u4ee4\u884c\u4e2d\u6587\u4e71\u7801\u89e3\u51b3\u65b9\u6848\uff1a\u68c0\u67e5\u8bed\u8a00\u73af\u5883\u53d8\u91cf\uff08lang \u548c lc_ctype\uff09\u662f\u5426\u8bbe\u7f6e\u4e3a c.utf-8 \u6216 en_us.utf-8\u3002\u8bbe\u7f6e utf-8 \u7ec8\u7aef\uff08\u5bfc\u51fa lc_all=en_us.utf-8\uff09\u3002\u5b89\u88c5 utf-8 \u5b57\u4f53\uff08\u4f8b\u5982 ttf-wqy-zenhei\uff09\u3002\u91cd\u65b0\u52a0\u8f7d\u7ec8\u7aef\uff08source ~\/.bashrc\uff09\u3002\u6d4b\u8bd5\u4e2d\u6587\u663e\u793a\uff08echo \u4f60\u597d\u4e16\u754c\uff09\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202409\/11\/2024091117573911113.jpg\" class=\"aligncenter\" title=\"ubuntu\u547d\u4ee4\u884c\u4e2d\u6587\u4e71\u7801\u600e\u4e48\u89e3\u51b3\u63d2\u56fe\" alt=\"ubuntu\u547d\u4ee4\u884c\u4e2d\u6587\u4e71\u7801\u600e\u4e48\u89e3\u51b3\u63d2\u56fe\" \/><\/p>\n<p><strong>Ubuntu \u547d\u4ee4\u884c\u4e2d\u6587\u4e71\u7801\u89e3\u51b3\u65b9\u6cd5<\/strong><\/p>\n<p><strong>\u95ee\u9898\uff1a<\/strong>\u5728 Ubuntu \u547d\u4ee4\u884c\u4e2d\uff0c\u4e2d\u6587\u6587\u5b57\u663e\u793a\u4e3a\u4e71\u7801\uff0c\u5982\u4f55\u89e3\u51b3\uff1f<\/p>\n<p><strong>\u89e3\u51b3\u65b9\u6848\uff1a<\/strong><\/p>\n<ol>\n<li>\n<p><strong>\u68c0\u67e5\u8bed\u8a00\u73af\u5883\u53d8\u91cf<\/strong><\/p>\n<p>\u4f7f\u7528 locale \u547d\u4ee4\u67e5\u770b\u5f53\u524d\u7684\u8bed\u8a00\u73af\u5883\u53d8\u91cf\uff1a<\/p>\n<pre>locale<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236  <\/p>\n<p>\u786e\u4fdd LANG \u548c LC_CTYPE \u8bbe\u7f6e\u4e3a C.UTF-8 \u6216 en_US.UTF-8\uff1a<\/p>\n<pre>LANG=C.UTF-8\nLC_CTYPE=C.UTF-8<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236  <\/li>\n<li>\n<p><strong>\u8bbe\u7f6e UTF-8 \u7ec8\u7aef<\/strong><\/p>\n<p>\u7f16\u8f91\u7ec8\u7aef\u914d\u7f6e\u6587\u4ef6\uff08\u4f8b\u5982 ~\/.bashrc\uff09\uff1a<\/p>\n<pre>gedit ~\/.bashrc<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236  <\/p>\n<p>\u5728\u6587\u4ef6\u672b\u5c3e\u6dfb\u52a0\u4ee5\u4e0b\u884c\uff1a<\/p>\n<pre>export LC_ALL=en_US.UTF-8<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236  <\/li>\n<li>\n<p><strong>\u5b89\u88c5 UTF-8 \u5b57\u4f53<\/strong><\/p>\n<p>\u5b89\u88c5\u9002\u7528\u4e8e\u4e2d\u6587\u7684 UTF-8 \u5b57\u4f53\uff0c\u4f8b\u5982\uff1a<\/p>\n<pre>sudo apt install ttf-wqy-zenhei<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236  <\/li>\n<li>\n<p><strong>\u91cd\u65b0\u52a0\u8f7d\u7ec8\u7aef<\/strong><\/p>\n<p>\u91cd\u65b0\u52a0\u8f7d\u7ec8\u7aef\u4ee5\u5e94\u7528\u66f4\u6539\uff1a<\/p>\n<pre>source ~\/.bashrc<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236  <\/li>\n<li>\n<p><strong>\u6d4b\u8bd5<\/strong><\/p>\n<p>\u4f7f\u7528 echo \u547d\u4ee4\u6d4b\u8bd5\u4e2d\u6587\u663e\u793a\uff1a<\/p>\n<pre>echo \u4f60\u597d\u4e16\u754c<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236  <\/li>\n<\/ol>\n<p>\u5982\u679c\u4ee5\u4e0a\u6b65\u9aa4\u4e0d\u8d77\u4f5c\u7528\uff0c\u8bf7\u5c1d\u8bd5\u4ee5\u4e0b\u9644\u52a0\u6b65\u9aa4\uff1a<\/p>\n<ul>\n<li> <strong>\u68c0\u67e5\u7ec8\u7aef\u4eff\u771f\u5668\u8bbe\u7f6e\uff1a<\/strong>\u786e\u4fdd\u7ec8\u7aef\u4eff\u771f\u5668\uff08\u4f8b\u5982 Gnome \u7ec8\u7aef\u6216 Konsole\uff09\u652f\u6301 UTF-8\u3002<\/li>\n<li> <strong>\u5378\u8f7d\u5e76\u91cd\u65b0\u5b89\u88c5\u76f8\u5173\u8f6f\u4ef6\u5305\uff1a<\/strong>\u5378\u8f7d\u5e76\u91cd\u65b0\u5b89\u88c5 locales \u548c fonts-wqy-zenhei \u8f6f\u4ef6\u5305\u3002<\/li>\n<li> <strong>\u4f7f\u7528\u5b57\u7b26\u6620\u5c04\u8868\uff1a<\/strong>\u5982\u679c\u5176\u4ed6\u65b9\u6cd5\u5931\u8d25\uff0c\u53ef\u4ee5\u4f7f\u7528\u5b57\u7b26\u6620\u5c04\u8868\u5c06\u4e71\u7801\u8f6c\u6362\u4e3a\u6b63\u786e\u7684\u4e2d\u6587\u5b57\u7b26\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662fubuntu\u547d\u4ee4\u884c\u4e2d\u6587\u4e71\u7801\u600e\u4e48\u89e3\u51b3\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8FDCServers\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ubuntu \u547d\u4ee4\u884c\u4e2d\u6587\u4e71\u7801\u89e3\u51b3\u65b9\u6848\uff1a\u68c0\u67e5\u8bed\u8a00\u73af\u5883\u53d8\u91cf\uff08lang \u548c lc_ctype\uff09\u662f\u5426\u8bbe\u7f6e\u4e3a c.utf-8 \u6216 en_us.utf-8\u3002\u8bbe\u7f6e utf-8 \u7ec8\u7aef\uff08\u5bfc\u51fa lc_all=en_us.utf-8\uff09\u3002\u5b89\u88c5 utf-8 \u5b57\u4f53\uff08\u4f8b\u5982 ttf-wqy-zenhei\uff09\u3002\u91cd\u65b0\u52a0\u8f7d\u7ec8\u7aef\uff08source ~\/.bashrc\uff09\u3002\u6d4b\u8bd5\u4e2d\u6587\u663e\u793a\uff08echo \u4f60\u597d\u4e16\u754c\uff09\u3002 Ubuntu \u547d\u4ee4\u884c\u4e2d\u6587\u4e71\u7801\u89e3\u51b3\u65b9\u6cd5 \u95ee\u9898\uff1a\u5728 Ubuntu \u547d\u4ee4\u884c\u4e2d\uff0c\u4e2d\u6587\u6587\u5b57\u663e\u793a\u4e3a\u4e71\u7801\uff0c\u5982\u4f55\u89e3\u51b3\uff1f \u89e3\u51b3\u65b9\u6848\uff1a \u68c0\u67e5\u8bed\u8a00\u73af\u5883\u53d8\u91cf \u4f7f\u7528 locale \u547d\u4ee4\u67e5\u770b\u5f53\u524d\u7684\u8bed\u8a00\u73af\u5883\u53d8\u91cf\uff1a locale \u767b\u5f55\u540e\u590d\u5236 \u786e\u4fdd LANG \u548c LC_CTYPE \u8bbe\u7f6e\u4e3a C.UTF-8 \u6216 en_US.UTF-8\uff1a LANG=C.UTF-8 LC_CTYPE=C.UTF-8 \u767b\u5f55\u540e\u590d\u5236 \u8bbe\u7f6e UTF-8 \u7ec8\u7aef \u7f16\u8f91\u7ec8\u7aef\u914d\u7f6e\u6587\u4ef6\uff08\u4f8b\u5982 ~\/.bashrc\uff09\uff1a gedit ~\/.bashrc \u767b\u5f55\u540e\u590d\u5236 \u5728\u6587\u4ef6\u672b\u5c3e\u6dfb\u52a0\u4ee5\u4e0b\u884c\uff1a export LC_ALL=en_US.UTF-8 \u767b\u5f55\u540e\u590d\u5236 \u5b89\u88c5 UTF-8 \u5b57\u4f53 \u5b89\u88c5\u9002\u7528\u4e8e\u4e2d\u6587\u7684 UTF-8 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-63931","post","type-post","status-publish","format-standard","hentry","category-os"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/63931","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=63931"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/63931\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=63931"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=63931"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=63931"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}