{"id":18166,"date":"2024-11-18T09:03:13","date_gmt":"2024-11-18T01:03:13","guid":{"rendered":"https:\/\/fwq.ai\/blog\/18166\/"},"modified":"2024-11-18T09:03:13","modified_gmt":"2024-11-18T01:03:13","slug":"linux%e5%87%ba%e7%8e%b0%e4%b9%b1%e7%a0%81%e6%80%8e%e4%b9%88%e5%8a%9e","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/18166\/","title":{"rendered":"linux\u51fa\u73b0\u4e71\u7801\u600e\u4e48\u529e"},"content":{"rendered":"<blockquote><p>\n  linux\u4e2d\u4e71\u7801\u95ee\u9898\u7684\u6839\u6e90\u5728\u4e8e\u5b57\u7b26\u96c6\u7f16\u7801\u4e0d\u5339\u914d\u3002\u89e3\u51b3\u6b65\u9aa4\u5982\u4e0b\uff1a\u68c0\u67e5\u5f53\u524d\u5b57\u7b26\u96c6\u7f16\u7801\u3002\u8bbe\u7f6e\u6b63\u786e\u7684\u5b57\u7b26\u96c6\u7f16\u7801\uff0c\u5305\u62ec\u4e34\u65f6\u548c\u6c38\u4e45\u8bbe\u7f6e\u3002\u91cd\u65b0\u542f\u52a8\u5e94\u7528\u7a0b\u5e8f\u3002\u8003\u8651\u5176\u4ed6\u89e3\u51b3\u65b9\u6cd5\uff0c\u5982\u68c0\u67e5\u6587\u4ef6\u7f16\u7801\u3001\u4f7f\u7528utf-8\u7f16\u7801\u3001\u5b89\u88c5\u7279\u5b9a\u5b57\u4f53\u3002\u6839\u636e\u5e94\u7528\u7a0b\u5e8f\u7684\u4e0d\u540c\uff0c\u91c7\u53d6\u7279\u5b9a\u89e3\u51b3\u65b9\u6cd5\uff0c\u5982\u68c0\u67e5\u7ec8\u7aef\u6a21\u62df\u5668\u8bbe\u7f6e\u3001\u8c03\u6574\u6587\u672c\u7f16\u8f91\u5668\u8bbe\u7f6e\u6216\u68c0\u67e5\u6d4f\u89c8\u5668unicode\u652f\u6301\u60c5\u51b5\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202406\/04\/2024060411212026324.jpg\" class=\"aligncenter\" title=\"linux\u51fa\u73b0\u4e71\u7801\u600e\u4e48\u529e\u63d2\u56fe\" alt=\"linux\u51fa\u73b0\u4e71\u7801\u600e\u4e48\u529e\u63d2\u56fe\" \/><\/p>\n<p><strong>Linux \u4e71\u7801\u95ee\u9898\u7684\u89e3\u51b3\u65b9\u6cd5<\/strong><\/p>\n<p>\u5f53\u5728 Linux \u7cfb\u7edf\u4e2d\u9047\u5230\u4e71\u7801\u95ee\u9898\u65f6\uff0c\u4e3b\u8981\u539f\u56e0\u662f\u5b57\u7b26\u96c6\u7f16\u7801\u4e0d\u5339\u914d\u3002\u89e3\u51b3\u6b64\u95ee\u9898\u7684\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<p><strong>1. \u68c0\u67e5\u5f53\u524d\u5b57\u7b26\u96c6\u7f16\u7801<\/strong><\/p>\n<ul>\n<li>\n<p>\u4f7f\u7528 locale \u547d\u4ee4\u67e5\u770b\u5f53\u524d\u5b57\u7b26\u96c6\u7f16\u7801\uff1a<\/p>\n<pre>$ locale<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<\/ul>\n<p><strong>2. \u8bbe\u7f6e\u6b63\u786e\u7684\u5b57\u7b26\u96c6\u7f16\u7801<\/strong><\/p>\n<ul>\n<li>\n<p>\u4e34\u65f6\u4fee\u6539\u5b57\u7b26\u96c6\u7f16\u7801\uff1a\u4f7f\u7528 export \u547d\u4ee4\uff0c\u4f8b\u5982\uff1a<\/p>\n<pre>$ export LANG=en_US.UTF-8<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<li>\n<p>\u6c38\u4e45\u4fee\u6539\u5b57\u7b26\u96c6\u7f16\u7801\uff1a\u7f16\u8f91 \/etc\/locale.conf \u6587\u4ef6\uff0c\u6dfb\u52a0\u4ee5\u4e0b\u884c\uff1a<\/p>\n<pre>LANG=en_US.UTF-8<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<\/ul>\n<p><strong>3. \u91cd\u65b0\u542f\u52a8\u5e94\u7528\u7a0b\u5e8f<\/strong><\/p>\n<ul>\n<li>\u5df2\u7ecf\u8fd0\u884c\u7684\u5e94\u7528\u7a0b\u5e8f\u53ef\u80fd\u4e0d\u4f1a\u81ea\u52a8\u5e94\u7528\u5b57\u7b26\u96c6\u7f16\u7801\u66f4\u6539\u3002\u5173\u95ed\u5e76\u91cd\u65b0\u542f\u52a8\u5e94\u7528\u7a0b\u5e8f\u3002<\/li>\n<\/ul>\n<p><strong>4. \u5176\u4ed6\u89e3\u51b3\u65b9\u6cd5<\/strong><\/p>\n<ul>\n<li> <strong>\u68c0\u67e5\u6587\u4ef6\u7f16\u7801\uff1a<\/strong>\u4f7f\u7528 file \u547d\u4ee4\u68c0\u67e5\u6587\u4ef6\u7f16\u7801\uff0c\u5e76\u786e\u4fdd\u4e0e\u5e94\u7528\u7a0b\u5e8f\u6216\u811a\u672c\u7684\u7f16\u7801\u4e00\u81f4\u3002<\/li>\n<li> <strong>\u4f7f\u7528 UTF-8 \u7f16\u7801\uff1a<\/strong>UTF-8 \u662f Linux \u4e2d\u5efa\u8bae\u7684\u901a\u7528\u7f16\u7801\uff0c\u5728\u5927\u591a\u6570\u60c5\u51b5\u4e0b\u90fd\u53ef\u4ee5\u89e3\u51b3\u4e71\u7801\u95ee\u9898\u3002<\/li>\n<li>\n<p><strong>\u5b89\u88c5\u76f8\u5173\u7684\u5b57\u4f53\uff1a<\/strong>\u67d0\u4e9b\u8bed\u8a00\u5b57\u7b26\u9700\u8981\u7279\u5b9a\u7684\u5b57\u4f53\u624d\u80fd\u6b63\u786e\u663e\u793a\u3002\u5b89\u88c5\u6240\u9700\u7684\u5b57\u4f53\uff0c\u4f8b\u5982\uff1a<\/p>\n<pre>$ sudo apt install fonts-thai-sarabun     # \u6cf0\u8bed\n$ sudo apt install fonts-devanagari-fonts # \u5370\u5730\u8bed<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<\/ul>\n<p><strong>5. \u9488\u5bf9\u7279\u5b9a\u5e94\u7528\u7a0b\u5e8f\u7684\u89e3\u51b3\u65b9\u6cd5<\/strong><\/p>\n<ul>\n<li> <strong>\u7ec8\u7aef\uff1a<\/strong>\u68c0\u67e5\u7ec8\u7aef\u6a21\u62df\u5668\u8bbe\u7f6e\uff0c\u786e\u4fdd\u5b57\u7b26\u96c6\u7f16\u7801\u4e0e Linux \u7cfb\u7edf\u4e00\u81f4\u3002<\/li>\n<li> <strong>\u6587\u672c\u7f16\u8f91\u5668\uff1a<\/strong>\u8c03\u6574\u6587\u672c\u7f16\u8f91\u5668\u8bbe\u7f6e\uff0c\u5c06\u5b57\u7b26\u96c6\u7f16\u7801\u8bbe\u7f6e\u4e3a UTF-8\u3002<\/li>\n<li> <strong>\u6d4f\u89c8\u5668\uff1a<\/strong>\u68c0\u67e5\u6d4f\u89c8\u5668\u8bbe\u7f6e\uff0c\u786e\u4fdd\u652f\u6301 Unicode \u5b57\u7b26\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u51fa\u73b0\u4e71\u7801\u600e\u4e48\u529e\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>linux\u4e2d\u4e71\u7801\u95ee\u9898\u7684\u6839\u6e90\u5728\u4e8e\u5b57\u7b26\u96c6\u7f16\u7801\u4e0d\u5339\u914d\u3002\u89e3\u51b3\u6b65\u9aa4\u5982\u4e0b\uff1a\u68c0\u67e5\u5f53\u524d\u5b57\u7b26\u96c6\u7f16\u7801\u3002\u8bbe\u7f6e\u6b63\u786e\u7684\u5b57\u7b26\u96c6\u7f16\u7801\uff0c\u5305\u62ec\u4e34\u65f6\u548c\u6c38\u4e45\u8bbe\u7f6e\u3002\u91cd\u65b0\u542f\u52a8\u5e94\u7528\u7a0b\u5e8f\u3002\u8003\u8651\u5176\u4ed6\u89e3\u51b3\u65b9\u6cd5\uff0c\u5982\u68c0\u67e5\u6587\u4ef6\u7f16\u7801\u3001\u4f7f\u7528utf-8\u7f16\u7801\u3001\u5b89\u88c5\u7279\u5b9a\u5b57\u4f53\u3002\u6839\u636e\u5e94\u7528\u7a0b\u5e8f\u7684\u4e0d\u540c\uff0c\u91c7\u53d6\u7279\u5b9a\u89e3\u51b3\u65b9\u6cd5\uff0c\u5982\u68c0\u67e5\u7ec8\u7aef\u6a21\u62df\u5668\u8bbe\u7f6e\u3001\u8c03\u6574\u6587\u672c\u7f16\u8f91\u5668\u8bbe\u7f6e\u6216\u68c0\u67e5\u6d4f\u89c8\u5668unicode\u652f\u6301\u60c5\u51b5\u3002 Linux \u4e71\u7801\u95ee\u9898\u7684\u89e3\u51b3\u65b9\u6cd5 \u5f53\u5728 Linux \u7cfb\u7edf\u4e2d\u9047\u5230\u4e71\u7801\u95ee\u9898\u65f6\uff0c\u4e3b\u8981\u539f\u56e0\u662f\u5b57\u7b26\u96c6\u7f16\u7801\u4e0d\u5339\u914d\u3002\u89e3\u51b3\u6b64\u95ee\u9898\u7684\u6b65\u9aa4\u5982\u4e0b\uff1a 1. \u68c0\u67e5\u5f53\u524d\u5b57\u7b26\u96c6\u7f16\u7801 \u4f7f\u7528 locale \u547d\u4ee4\u67e5\u770b\u5f53\u524d\u5b57\u7b26\u96c6\u7f16\u7801\uff1a $ locale \u767b\u5f55\u540e\u590d\u5236 2. \u8bbe\u7f6e\u6b63\u786e\u7684\u5b57\u7b26\u96c6\u7f16\u7801 \u4e34\u65f6\u4fee\u6539\u5b57\u7b26\u96c6\u7f16\u7801\uff1a\u4f7f\u7528 export \u547d\u4ee4\uff0c\u4f8b\u5982\uff1a $ export LANG=en_US.UTF-8 \u767b\u5f55\u540e\u590d\u5236 \u6c38\u4e45\u4fee\u6539\u5b57\u7b26\u96c6\u7f16\u7801\uff1a\u7f16\u8f91 \/etc\/locale.conf \u6587\u4ef6\uff0c\u6dfb\u52a0\u4ee5\u4e0b\u884c\uff1a LANG=en_US.UTF-8 \u767b\u5f55\u540e\u590d\u5236 3. \u91cd\u65b0\u542f\u52a8\u5e94\u7528\u7a0b\u5e8f \u5df2\u7ecf\u8fd0\u884c\u7684\u5e94\u7528\u7a0b\u5e8f\u53ef\u80fd\u4e0d\u4f1a\u81ea\u52a8\u5e94\u7528\u5b57\u7b26\u96c6\u7f16\u7801\u66f4\u6539\u3002\u5173\u95ed\u5e76\u91cd\u65b0\u542f\u52a8\u5e94\u7528\u7a0b\u5e8f\u3002 4. \u5176\u4ed6\u89e3\u51b3\u65b9\u6cd5 \u68c0\u67e5\u6587\u4ef6\u7f16\u7801\uff1a\u4f7f\u7528 file \u547d\u4ee4\u68c0\u67e5\u6587\u4ef6\u7f16\u7801\uff0c\u5e76\u786e\u4fdd\u4e0e\u5e94\u7528\u7a0b\u5e8f\u6216\u811a\u672c\u7684\u7f16\u7801\u4e00\u81f4\u3002 \u4f7f\u7528 UTF-8 \u7f16\u7801\uff1aUTF-8 \u662f Linux \u4e2d\u5efa\u8bae\u7684\u901a\u7528\u7f16\u7801\uff0c\u5728\u5927\u591a\u6570\u60c5\u51b5\u4e0b\u90fd\u53ef\u4ee5\u89e3\u51b3\u4e71\u7801\u95ee\u9898\u3002 \u5b89\u88c5\u76f8\u5173\u7684\u5b57\u4f53\uff1a\u67d0\u4e9b\u8bed\u8a00\u5b57\u7b26\u9700\u8981\u7279\u5b9a\u7684\u5b57\u4f53\u624d\u80fd\u6b63\u786e\u663e\u793a\u3002\u5b89\u88c5\u6240\u9700\u7684\u5b57\u4f53\uff0c\u4f8b\u5982\uff1a $ sudo apt install fonts-thai-sarabun # \u6cf0\u8bed $ sudo apt install fonts-devanagari-fonts [&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-18166","post","type-post","status-publish","format-standard","hentry","category-os"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/18166","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=18166"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/18166\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=18166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=18166"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=18166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}