{"id":1586,"date":"2023-11-18T11:05:15","date_gmt":"2023-11-18T03:05:15","guid":{"rendered":"https:\/\/peloo.net\/?p=1586"},"modified":"2023-11-18T11:05:15","modified_gmt":"2023-11-18T03:05:15","slug":"ubuntu18%e8%ae%be%e7%bd%ae%e4%b8%ad%e6%96%87%e6%94%af%e6%8c%81","status":"publish","type":"post","link":"https:\/\/peloo.net\/?p=1586","title":{"rendered":"Ubuntu18\u8bbe\u7f6e\u4e2d\u6587\u652f\u6301"},"content":{"rendered":"<h1>\u5b89\u88c5\u76f8\u5173\u4f9d\u8d56\u5305<\/h1>\n<pre><code class=\"language-bash\">sudo apt install language-pack-zh-han*\n\ncd\nsed -i -E -e &#039;\/# Chinese char support start\/,\/# Chinese char support stop\/d&#039; .bashrc\ncat &gt;&gt; .bashrc &lt;&lt;EOF\n# Chinese char support start\nexport LANG=&quot;en_US.UTF-8&quot;\nexport LC_CTYPE=&quot;zh_CN.UTF-8&quot;\n# Chinese char support stop\n\nEOF\n\nsudo su\n\ncd\n\nsed -i -E -e &#039;\/# Chinese char support start\/,\/# Chinese char support stop\/d&#039; .bashrc\ncat &gt;&gt; .bashrc &lt;&lt;EOF\n# Chinese char support start\nexport LANG=&quot;en_US.UTF-8&quot;\nexport LC_CTYPE=&quot;zh_CN.UTF-8&quot;\n# Chinese char support stop\n\nEOF\n\nsed -i -E -e &#039;\/# Chinese char support start\/,\/# Chinese char support stop\/d&#039; \/etc\/profile\ncat &gt;&gt; \/etc\/profile &lt;&lt;EOF\n# Chinese char support start\nexport LANG=&quot;en_US.UTF-8&quot;\nexport LC_CTYPE=&quot;zh_CN.UTF-8&quot;\n# Chinese char support stop\n\nEOF\n\n[ ! -e \/var\/lib\/locales\/supported.d\/local ] &amp;&amp; touch \/var\/lib\/locales\/supported.d\/local\n[ -e \/var\/lib\/locales\/supported.d\/local ] &amp;&amp; sed -i -E -e &#039;\/# Chinese char support start\/,\/# Chinese char support stop\/d&#039; \/var\/lib\/locales\/supported.d\/local\n\ncat &gt;&gt; \/var\/lib\/locales\/supported.d\/local &lt;&lt;EOF\n# Chinese char support start\nzh_CN.UTF-8 UTF-8\nzh_CN.GB18030 GB18030\nzh_CN.GBK GBK\n# Chinese char support stop\nEOF\n\nsed -i -E -e &#039;\/&quot; Chinese char support start\/,\/&quot; Chinese char support stop\/d&#039; \/etc\/vim\/vimrc\n\ncat &gt;&gt; \/etc\/vim\/vimrc &lt;&lt;EOF\n&quot; Chinese char support start\nset fileencodings=utf-8,gbk,utf-16le,cp1252,iso-8859-15,ucs-bom\nset termencoding=utf-8\nset encoding=utf-8\n&quot; Chinese char support stop\nEOF\n\ncat &lt;&lt;EOF | sudo tee \/etc\/default\/locale\nLANG=&quot;en_US.UTF-8&quot;\nLANGUAGE=&quot;en_US:en&quot;\nLC_NUMERIC=&quot;en_US.UTF-8&quot;\nLC_TIME=&quot;en_US.UTF-8&quot;\nLC_MONETARY=&quot;en_US.UTF-8&quot;\nLC_PAPER=&quot;en_US.UTF-8&quot;\nLC_IDENTIFICATION=&quot;en_US.UTF-8&quot;\nLC_NAME=&quot;en_US.UTF-8&quot;\nLC_ADDRESS=&quot;en_US.UTF-8&quot;\nLC_TELEPHONE=&quot;en_US.UTF-8&quot;\nLC_MEASUREMENT=&quot;en_US.UTF-8&quot;\nEOF\n\nlocale-gen\n\nexit\n\nexec bash\ncd\necho &quot;\u4e2d\u6587\u652f\u6301\u6d4b\u8bd5&quot; &gt; t.txt\ncat t.txt\nrm -f t.txt\n<\/code><\/pre>\n<h1>\u91cd\u542f\u7cfb\u7edf\uff0c\u67e5\u770bfind ls vim nano less cat\u51e0\u4e2a\u547d\u4ee4\u662f\u5426\u6b63\u5e38\u663e\u793a\u4e2d\u6587<\/h1>\n<p>sudo init 6<\/p>\n<h1>\u53c2\u8003\u6587\u6863<\/h1>\n<p><a href=\"https:\/\/blog.csdn.net\/wbj217\/article\/details\/85263723\">https:\/\/blog.csdn.net\/wbj217\/article\/details\/85263723<\/a><\/p>\n<p><a href=\"https:\/\/blog.csdn.net\/qq_19004627\/article\/details\/101780256\">https:\/\/blog.csdn.net\/qq_19004627\/article\/details\/101780256<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b89\u88c5\u76f8\u5173\u4f9d\u8d56\u5305 sudo apt install language-pack-zh-han* cd sed -i -E -e &#039;\/# Chinese char support start\/,\/# Chinese char support stop\/d&#039; .bashrc cat &gt;&gt; .bashrc &lt;&lt;EOF # Chinese char support start export LANG=&quot;en_US.UTF-8&quot; export LC_CTYPE=&quot;zh_CN.UTF-8&quot; # Chinese char support stop EOF sudo su cd sed -i -E -e &#039;\/# Chinese char support start\/,\/# Chinese char support stop\/d&#039;&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/peloo.net\/index.php?rest_route=\/wp\/v2\/posts\/1586"}],"collection":[{"href":"https:\/\/peloo.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/peloo.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/peloo.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/peloo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1586"}],"version-history":[{"count":1,"href":"https:\/\/peloo.net\/index.php?rest_route=\/wp\/v2\/posts\/1586\/revisions"}],"predecessor-version":[{"id":1587,"href":"https:\/\/peloo.net\/index.php?rest_route=\/wp\/v2\/posts\/1586\/revisions\/1587"}],"wp:attachment":[{"href":"https:\/\/peloo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1586"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/peloo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1586"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/peloo.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1586"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}