{"id":1191,"date":"2025-02-21T11:37:07","date_gmt":"2025-02-21T03:37:07","guid":{"rendered":"http:\/\/www.huerpu.cc:7000\/?p=1191"},"modified":"2025-02-21T11:37:07","modified_gmt":"2025-02-21T03:37:07","slug":"webmin%e9%85%8d%e7%bd%ae%e7%bb%88%e7%ab%af%e6%98%be%e7%a4%ba%e6%a0%b7%e5%bc%8f%ef%bc%8c%e6%a8%a1%e4%bb%bfubuntudesktop%e7%bb%88%e7%ab%af","status":"publish","type":"post","link":"http:\/\/www.huerpu.cc:7000\/?p=1191","title":{"rendered":"webmin\u914d\u7f6e\u7ec8\u7aef\u663e\u793a\u6837\u5f0f\uff0c\u6a21\u4effUbuntuDesktop\u7ec8\u7aef"},"content":{"rendered":"<h1>webmin\u914d\u7f6e\u7ec8\u7aef\u663e\u793a\u6837\u5f0f\uff0c\u6a21\u4effUbuntuDesktop\u7ec8\u7aef<\/h1>\n<p>\u5728webmin\u4e2d\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u662f\u6ca1\u6709\u56fe\u5f62\u5316\u684c\u9762\u7684\uff0c\u56e0\u6b64\u7ec8\u7aef\u754c\u9762\u4e5f\u4e0d\u4f1a\u50cf Ubuntu Desktop \u90a3\u6837\u6709\u9884\u8bbe\u7684\u7d2b\u8272\u80cc\u666f\u548c\u989c\u8272\u4e3b\u9898\u3002\u4e0d\u8fc7\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u4fee\u6539 <code>~\/.bashrc<\/code> \u6587\u4ef6\uff0c\u5e76\u7ed3\u5408\u5b89\u88c5\u548c\u914d\u7f6e <code>ls<\/code> \u547d\u4ee4\u7684\u989c\u8272\u65b9\u6848\uff0c\u6765\u6a21\u62df Ubuntu Desktop \u7ec8\u7aef\u7684\u663e\u793a\u6548\u679c\u3002<\/p>\n<p>\u4ee5\u4e0b\u662f\u8be6\u7ec6\u7684\u6b65\u9aa4\uff1a<\/p>\n<hr \/>\n<h3>\u6b65\u9aa4 1\uff1a\u5b89\u88c5 <code>ls<\/code> \u989c\u8272\u652f\u6301<\/h3>\n<p>Ubuntu Desktop \u7684\u7ec8\u7aef\u4e2d\uff0c<code>ls<\/code> \u547d\u4ee4\u4f1a\u663e\u793a\u5f69\u8272\u8f93\u51fa\u3002\u4e3a\u4e86\u5b9e\u73b0\u8fd9\u4e00\u70b9\uff0c\u9700\u8981\u786e\u4fdd <code>dircolors<\/code> \u5de5\u5177\u5df2\u5b89\u88c5\u5e76\u914d\u7f6e\u3002<\/p>\n<ol>\n<li>\n<p>\u6253\u5f00\u7ec8\u7aef\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5 <code>dircolors<\/code>\uff1a<\/p>\n<pre><code>sudo apt update\nsudo apt install coreutils<\/code><\/pre>\n<\/li>\n<li>\n<p>\u751f\u6210\u9ed8\u8ba4\u7684 <code>dircolors<\/code> \u914d\u7f6e\u6587\u4ef6\uff1a<\/p>\n<pre><code>dircolors -p > ~\/.dircolors<\/code><\/pre>\n<\/li>\n<li>\n<p>\u7f16\u8f91 <code>~\/.dircolors<\/code> \u6587\u4ef6\uff0c\u786e\u4fdd\u989c\u8272\u914d\u7f6e\u7b26\u5408\u4f60\u7684\u9700\u6c42\u3002\u4f60\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528 Ubuntu Desktop \u7684\u9ed8\u8ba4\u914d\u7f6e\uff1a<\/p>\n<pre><code>nano ~\/.dircolors<\/code><\/pre>\n<p>\u5c06\u4ee5\u4e0b\u5185\u5bb9\u7c98\u8d34\u5230\u6587\u4ef6\u4e2d\uff1a<\/p>\n<pre><code># Default colors for the ls command\nTERM xterm-256color\nCOLOR 01;32  # directory\nCOLOR 01;34  # symbolic link\nCOLOR 01;36  # socket\nCOLOR 01;35  # pipe\nCOLOR 01;33  # executable\nCOLOR 01;31  # block device\nCOLOR 01;35  # character device\nCOLOR 01;33  # executable with setuid\nCOLOR 01;33  # executable with setgid\nCOLOR 01;37  # directory writable to others, with sticky bit\nCOLOR 01;37  # directory writable to others, without sticky bit<\/code><\/pre>\n<\/li>\n<li>\n<p>\u4fdd\u5b58\u5e76\u9000\u51fa\u7f16\u8f91\u5668\u3002<\/p>\n<\/li>\n<\/ol>\n<hr \/>\n<h3>\u6b65\u9aa4 2\uff1a\u4fee\u6539 <code>~\/.bashrc<\/code> \u6587\u4ef6<\/h3>\n<ol>\n<li>\n<p>\u6253\u5f00 <code>~\/.bashrc<\/code> \u6587\u4ef6\uff1a<\/p>\n<pre><code>nano ~\/.bashrc<\/code><\/pre>\n<\/li>\n<li>\n<p>\u5728\u6587\u4ef6\u672b\u5c3e\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/p>\n<pre><code># Enable color support for ls\nif [ -x \/usr\/bin\/dircolors ]; then\n   eval \"$(dircolors -b ~\/.dircolors)\"\n   alias ls='ls --color=auto'\n   alias grep='grep --color=auto'\n   alias fgrep='fgrep --color=auto'\n   alias egrep='egrep --color=auto'\nfi\n\n# Set PS1 (prompt) to match Ubuntu Desktop\nexport PS1='\\[\\e[1;32m\\]\\u@\\h\\[\\e[0m\\]:\\[\\e[1;34m\\]\\w\\[\\e[0m\\]\\$ '\n\n# Set terminal colors (optional)\nif [ \"$TERM\" = \"xterm-256color\" ] || [ \"$TERM\" = \"xterm\" ]; then\n   echo -ne \"\\e]11;#300A24\\a\"  # Set background to purple\n   echo -ne \"\\e]10;#FFFFFF\\a\"  # Set text to white\n   echo -ne \"\\e]12;#FFFFFF\\a\"  # Set cursor to white\nfi<\/code><\/pre>\n<ul>\n<li><code>eval &quot;$(dircolors -b ~\/.dircolors)&quot;<\/code>\uff1a\u52a0\u8f7d <code>dircolors<\/code> \u914d\u7f6e\uff0c\u4f7f <code>ls<\/code> \u547d\u4ee4\u663e\u793a\u5f69\u8272\u8f93\u51fa\u3002<\/li>\n<li><code>PS1<\/code>\uff1a\u8bbe\u7f6e\u7ec8\u7aef\u7684\u63d0\u793a\u7b26\u6837\u5f0f\uff0c\u6a21\u4eff Ubuntu Desktop \u7684\u7eff\u8272\u7528\u6237\u540d\u548c\u84dd\u8272\u8def\u5f84\u3002<\/li>\n<li><code>echo -ne<\/code>\uff1a\u8bbe\u7f6e\u7ec8\u7aef\u7684\u80cc\u666f\u8272\u3001\u6587\u5b57\u989c\u8272\u548c\u5149\u6807\u989c\u8272\uff08\u53ef\u9009\uff09\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u4fdd\u5b58\u5e76\u9000\u51fa\u7f16\u8f91\u5668\u3002<\/p>\n<\/li>\n<\/ol>\n<hr \/>\n<h3>\u6b65\u9aa4 3\uff1a\u4f7f\u66f4\u6539\u751f\u6548<\/h3>\n<ol>\n<li>\n<p>\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u4f7f\u66f4\u6539\u7acb\u5373\u751f\u6548\uff1a<\/p>\n<pre><code>source ~\/.bashrc<\/code><\/pre>\n<\/li>\n<li>\n<p>\u73b0\u5728\u4f60\u7684\u7ec8\u7aef\u5e94\u8be5\u4f1a\u663e\u793a\u5f69\u8272\u8f93\u51fa\uff0c\u5e76\u4e14\u63d0\u793a\u7b26\u6837\u5f0f\u7c7b\u4f3c\u4e8e Ubuntu Desktop\u3002<\/p>\n<\/li>\n<\/ol>\n<hr \/>\n<h3>\u6b65\u9aa4 4\uff1a\u9a8c\u8bc1\u6548\u679c<\/h3>\n<ol>\n<li>\u8fd0\u884c <code>ls<\/code> \u547d\u4ee4\uff0c\u68c0\u67e5\u662f\u5426\u663e\u793a\u5f69\u8272\u8f93\u51fa\u3002<\/li>\n<li>\u68c0\u67e5\u7ec8\u7aef\u63d0\u793a\u7b26\u662f\u5426\u53d8\u4e3a\u7eff\u8272\u7528\u6237\u540d\u548c\u84dd\u8272\u8def\u5f84\u3002<\/li>\n<li>\u5982\u679c\u8bbe\u7f6e\u4e86\u80cc\u666f\u8272\uff0c\u68c0\u67e5\u7ec8\u7aef\u80cc\u666f\u662f\u5426\u53d8\u4e3a\u7d2b\u8272\u3002<\/li>\n<\/ol>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2025\/02\/21\/97e43f09624d.png\" alt=\"image-20250221113350325\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>webmin\u914d\u7f6e\u7ec8\u7aef\u663e\u793a\u6837\u5f0f\uff0c\u6a21\u4effUbuntuDesktop\u7ec8\u7aef \u5728webmin\u4e2d\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u662f\u6ca1\u6709\u56fe\u5f62\u5316\u684c\u9762 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30],"tags":[],"class_list":["post-1191","post","type-post","status-publish","format-standard","hentry","category-ubuntu"],"_links":{"self":[{"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/posts\/1191","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1191"}],"version-history":[{"count":1,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/posts\/1191\/revisions"}],"predecessor-version":[{"id":1192,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/posts\/1191\/revisions\/1192"}],"wp:attachment":[{"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1191"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1191"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1191"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}