{"id":61642,"date":"2026-01-18T09:49:44","date_gmt":"2026-01-18T01:49:44","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/61642.html"},"modified":"2026-01-18T09:49:44","modified_gmt":"2026-01-18T01:49:44","slug":"%e6%9c%8d%e5%8a%a1%e7%ab%af%e4%b8%80%e9%94%ae%e9%85%8d%e7%bd%ae-zsh%ef%bc%9a%e6%89%8b%e5%b7%a5%e8%bf%90%e7%bb%b4%e8%b5%b7%e9%a3%9e%ef%bc%88%e5%8e%9f%e7%94%9f-%c2%b7-%e5%ae%89%e5%85%a8-%c2%b7-%e6%9e%81","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/61642.html","title":{"rendered":"\u670d\u52a1\u7aef\u4e00\u952e\u914d\u7f6e zsh\uff1a\u624b\u5de5\u8fd0\u7ef4\u8d77\u98de\uff08\u539f\u751f \u00b7 \u5b89\u5168 \u00b7 \u6781\u7b80\uff09"},"content":{"rendered":"<p>\u4f5c\u8005&#xff1a;\u65f7\u91ce\u8bf4 tikrok.cc \u7f51\u7ad9\u4f5c\u54c1\u5f00\u6e90\u4f5c\u8005<br \/>\n\u573a\u666f&#xff1a;\u4e91\u670d\u52a1\u5668&#xff08;CentOS \/ Ubuntu \/ Alpine&#xff09;\u3001\u5bb9\u5668\u73af\u5883\u3001\u6279\u91cf\u8fd0\u7ef4<br \/>\n\u76ee\u6807&#xff1a;5 \u79d2\u5b8c\u6210\u9ad8\u6548\u7ec8\u7aef\u914d\u7f6e&#xff0c;\u4e0d\u88c5\u63d2\u4ef6\u3001\u4e0d\u8054\u7f51\u3001\u4e0d\u63d0\u6743<\/p>\n<p>\u5728\u670d\u52a1\u7aef\u4e16\u754c&#xff0c;\u6211\u4eec\u8ffd\u6c42\u7684\u662f \u786e\u5b9a\u6027\u3001\u53ef\u5ba1\u8ba1\u3001\u6700\u5c0f\u5316\u653b\u51fb\u9762\u3002\u4f60\u4e0d\u9700\u8981\u82b1\u54e8\u7684\u63d0\u793a\u7b26&#xff0c;\u4e0d\u9700\u8981 GitHub \u63d2\u4ef6&#xff0c;\u66f4\u4e0d\u9700\u8981 root \u6743\u9650\u2014\u2014\u4f60\u53ea\u9700\u8981\u4e00\u4e2a\u80fd\u8ba9\u4f60\u5feb\u901f\u5b9a\u4f4d\u65e5\u5fd7\u3001\u7cbe\u51c6\u6267\u884c\u547d\u4ee4\u3001\u9ad8\u6548\u590d\u7528\u5386\u53f2\u7684 shell\u3002<\/p>\n<p>zsh \u7684\u539f\u751f\u80fd\u529b&#xff0c;\u8db3\u4ee5\u652f\u6491\u8fd9\u4e00\u5207\u3002<\/p>\n<hr \/>\n<h3>\u4e00\u3001\u4e3a\u4ec0\u4e48\u670d\u52a1\u7aef\u8981\u914d\u7f6e zsh&#xff1f;<\/h3>\n<table>\n<tr>\u75db\u70b9\u539f\u751f zsh \u89e3\u6cd5<\/tr>\n<tbody>\n<tr>\n<td>Bash \u5386\u53f2\u6df7\u4e71&#xff0c;\u91cd\u590d\u547d\u4ee4\u5237\u5c4f<\/td>\n<td>setopt hist_ignore_dups \u81ea\u52a8\u53bb\u91cd<\/td>\n<\/tr>\n<tr>\n<td>cd \/very\/long\/path \u624b\u52a8\u8f93\u5165\u6613\u9519<\/td>\n<td>Tab \u8865\u5168 &#043; \u83dc\u5355\u9009\u62e9&#xff08;zstyle menu select&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u591a\u4f1a\u8bdd\u8c03\u8bd5\u65f6\u547d\u4ee4\u4e0d\u540c\u6b65<\/td>\n<td>setopt share_history \u5b9e\u65f6\u5171\u4eab\u5386\u53f2<\/td>\n<\/tr>\n<tr>\n<td>\u8bef\u6267\u884c rm -rf \/ \u7c7b\u547d\u4ee4<\/td>\n<td>setopt hist_verify \u9884\u89c8\u518d\u6267\u884c<\/td>\n<\/tr>\n<tr>\n<td>\u542f\u52a8\u6162&#xff08;\u5c24\u5176\u5bb9\u5668\u73af\u5883&#xff09;<\/td>\n<td>\u65e0\u63d2\u4ef6 &#043; \u7f13\u5b58\u52a0\u8f7d&#xff0c;\u542f\u52a8 &lt; 20ms<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u2705 \u6838\u5fc3\u539f\u5219&#xff1a;\u53ea\u542f\u7528\u529f\u80fd&#xff0c;\u4e0d\u5f15\u5165\u4f9d\u8d56<\/p>\n<hr \/>\n<h3>\u4e8c\u3001\u670d\u52a1\u7aef zsh \u914d\u7f6e\u4e09\u8981\u7d20<\/h3>\n<li>\u65e0\u9700 root&#xff1a;\u6240\u6709\u914d\u7f6e\u5728 $HOME<\/li>\n<li>\u65e0\u9700\u7f51\u7edc&#xff1a;\u4e0d clone \u4efb\u4f55\u4ed3\u5e93<\/li>\n<li>\u65e0\u9700\u63d2\u4ef6&#xff1a;\u4ec5\u7528 zsh \u5185\u7f6e\u529f\u80fd<\/li>\n<hr \/>\n<h3>\u4e09\u3001\u4e00\u952e\u914d\u7f6e\u811a\u672c&#xff08;\u7eaf Shell&#xff0c;\u517c\u5bb9 sh\/bash\/zsh&#xff09;<\/h3>\n<p>\u5c06\u4ee5\u4e0b\u811a\u672c\u4fdd\u5b58\u4e3a setup-zsh.sh&#xff0c;\u4e0a\u4f20\u5230\u670d\u52a1\u5668\u5e76\u6267\u884c&#xff1a;<\/p>\n<p><span class=\"token shebang important\">#!\/bin\/sh<\/span><br \/>\n<span class=\"token comment\"># setup-zsh.sh \u2014\u2014 \u670d\u52a1\u7aef zsh \u6781\u7b80\u914d\u7f6e&#xff08;\u65e0\u63d2\u4ef6 \u00b7 \u65e0\u7f51\u7edc \u00b7 \u65e0 root&#xff09;<\/span><\/p>\n<p><span class=\"token assign-left variable\">ZSHRC<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;<span class=\"token environment constant\">$HOME<\/span>\/.zshrc&#034;<\/span><\/p>\n<p><span class=\"token function\">cat<\/span> <span class=\"token operator\">&gt;<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$ZSHRC<\/span>&#034;<\/span> <span class=\"token operator\">&lt;&lt;<\/span> <span class=\"token string\">&#039;EOF&#039;<br \/>\n# ~\/.zshrc \u2014\u2014 \u670d\u52a1\u7aef\u9ad8\u6548\u8fd0\u7ef4\u4e13\u7528&#xff08;\u539f\u751f zsh&#xff09;<\/p>\n<p># &#061;&#061;&#061; \u8865\u5168\u7cfb\u7edf&#xff08;\u52a0\u901f\u542f\u52a8&#xff09;&#061;&#061;&#061;<br \/>\nif [ -f &#034;$HOME\/.zcompdump&#034; ] &amp;&amp; [ &#034;$HOME\/.zcompdump&#034; -nt &#034;$HOME\/.zshrc&#034; ]; then<br \/>\n  source &#034;$HOME\/.zcompdump&#034;<br \/>\nelse<br \/>\n  autoload -Uz compinit &amp;&amp; compinit<br \/>\nfi<\/p>\n<p># &#061;&#061;&#061; \u5386\u53f2\u589e\u5f3a &#061;&#061;&#061;<br \/>\nHISTFILE&#061;&#034;$HOME\/.zsh_history&#034;<br \/>\nHISTSIZE&#061;10000<br \/>\nSAVEHIST&#061;10000<br \/>\nsetopt inc_append_history    # \u5b9e\u65f6\u5199\u5165<br \/>\nsetopt share_history         # \u591a\u4f1a\u8bdd\u540c\u6b65<br \/>\nsetopt hist_ignore_dups      # \u5ffd\u7565\u8fde\u7eed\u91cd\u590d<br \/>\nsetopt hist_find_no_dups     # \u641c\u7d22\u65f6\u8df3\u8fc7\u91cd\u590d<br \/>\nsetopt hist_ignore_space     # \u7a7a\u683c\u5f00\u5934\u547d\u4ee4\u4e0d\u8bb0\u5f55&#xff08;\u4fdd\u62a4\u654f\u611f\u64cd\u4f5c&#xff09;<br \/>\nsetopt hist_verify           # ! \u6269\u5c55\u5148\u9884\u89c8<\/p>\n<p># &#061;&#061;&#061; \u952e\u7ed1\u5b9a &#061;&#061;&#061;<br \/>\n# \u4e0a\u4e0b\u7bad\u5934&#xff1a;\u524d\u7f00\u5386\u53f2\u641c\u7d22<br \/>\nbindkey &#039;^[[A&#039; history-beginning-search-backward<br \/>\nbindkey &#039;^[OA&#039; history-beginning-search-backward<br \/>\nbindkey &#039;^[[B&#039; history-beginning-search-forward<br \/>\nbindkey &#039;^[OB&#039; history-beginning-search-forward<\/p>\n<p># \u5355\u8bcd\u8df3\u8f6c&#xff08;Alt&#043;f\/b&#xff09;<br \/>\nbindkey &#039;^[f&#039; forward-word<br \/>\nbindkey &#039;^[b&#039; backward-word<\/p>\n<p># \u64a4\u9500<br \/>\nbindkey &#039;^_&#039; undo<\/p>\n<p># &#061;&#061;&#061; \u8865\u5168\u4f18\u5316 &#061;&#061;&#061;<br \/>\nzstyle &#039;:completion:*&#039; menu select<br \/>\nsetopt auto_list<br \/>\nsetopt auto_menu<\/p>\n<p># &#061;&#061;&#061; \u63d0\u793a\u7b26&#xff08;\u7b80\u6d01 &#043; \u663e\u793a\u7528\u6237\/\u4e3b\u673a\/\u8def\u5f84&#xff09;&#061;&#061;&#061;<br \/>\nPROMPT&#061;&#039;%F{green}%n&#064;%m%f:%F{blue}%~%f %# &#039;<br \/>\nEOF<\/span><\/p>\n<p><span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;\u2705 .zshrc \u5df2\u751f\u6210&#034;<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;&#x1f449; \u6267\u884c &#039;exec zsh&#039; \u7acb\u5373\u751f\u6548&#034;<\/span><\/p>\n<h4>\u4f7f\u7528\u65b9\u5f0f&#xff1a;<\/h4>\n<p>&#x1f4a1; \u65e0\u9700\u5b89\u88c5 zsh&#xff1f;<br \/>\n\u5927\u591a\u6570\u73b0\u4ee3 Linux \u53d1\u884c\u7248\u5df2\u9884\u88c5 zsh\u3002\u82e5\u672a\u5b89\u88c5&#xff1a;<\/p>\n<p><span class=\"token comment\"># Ubuntu\/Debian<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">apt-get<\/span> <span class=\"token function\">install<\/span> -y <span class=\"token function\">zsh<\/span><br \/>\n<span class=\"token comment\"># CentOS\/RHEL<\/span><br \/>\n<span class=\"token function\">sudo<\/span> yum <span class=\"token function\">install<\/span> -y <span class=\"token function\">zsh<\/span><br \/>\n<span class=\"token comment\"># Alpine<\/span><br \/>\napk <span class=\"token function\">add<\/span> <span class=\"token function\">zsh<\/span><\/p>\n<hr \/>\n<h3>\u56db\u3001\u670d\u52a1\u7aef\u7279\u5316\u4f18\u5316<\/h3>\n<h4>1. \u7981\u7528\u8017\u65f6\u529f\u80fd<\/h4>\n<ul>\n<li>\u4e0d\u52a0\u8f7d vcs_info&#xff08;\u907f\u514d git \u68c0\u6d4b\u62d6\u6162\u76ee\u5f55\u5207\u6362&#xff09;<\/li>\n<li>\u4e0d\u542f\u7528\u8bed\u6cd5\u9ad8\u4eae&#xff08;\u4f9d\u8d56\u5916\u90e8\u811a\u672c&#xff0c;\u4e14\u670d\u52a1\u7aef\u65e0\u9700\u89c6\u89c9\u53cd\u9988&#xff09;<\/li>\n<\/ul>\n<h4>2. \u5b89\u5168\u4f18\u5148<\/h4>\n<ul>\n<li>hist_ignore_space&#xff1a;\u4ee5\u7a7a\u683c\u5f00\u5934\u7684\u547d\u4ee4&#xff08;\u5982  mysql -p secret&#xff09;\u4e0d\u4f1a\u8bb0\u5f55\u5230\u5386\u53f2<\/li>\n<li>hist_verify&#xff1a;!! \u6216 !rm \u4f1a\u5148\u663e\u793a\u547d\u4ee4&#xff0c;\u786e\u8ba4\u540e\u624d\u6267\u884c<\/li>\n<\/ul>\n<h4>3. \u591a\u4f1a\u8bdd\u534f\u540c<\/h4>\n<ul>\n<li>\u5728 tmux \u6216\u591a\u4e2a SSH \u4f1a\u8bdd\u4e2d&#xff0c;\u6267\u884c tail -f app.log \u540e&#xff0c;<\/li>\n<li>\u5728\u53e6\u4e00\u7a97\u53e3\u8f93\u5165 tail &#043; \u2191&#xff0c;\u7acb\u5373\u590d\u7528\u8be5\u547d\u4ee4<\/li>\n<\/ul>\n<hr \/>\n<h3>\u4e94\u3001\u6279\u91cf\u90e8\u7f72&#xff08;Ansible \/ Shell \u5faa\u73af&#xff09;<\/h3>\n<h4>Ansible \u793a\u4f8b&#xff1a;<\/h4>\n<p><span class=\"token punctuation\">&#8211;<\/span> <span class=\"token key atrule\">name<\/span><span class=\"token punctuation\">:<\/span> Deploy zsh config<br \/>\n  <span class=\"token key atrule\">copy<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">content<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">|<\/span><span class=\"token scalar string\"><br \/>\n      # ~\/.zshrc \u2014\u2014 \u6279\u91cf\u8fd0\u7ef4\u7248<br \/>\n      HISTSIZE&#061;10000<br \/>\n      setopt inc_append_history share_history hist_ignore_dups<br \/>\n      bindkey &#039;^[OA&#039; history-beginning-search-backward<br \/>\n      zstyle &#039;:completion:*&#039; menu select<br \/>\n      PROMPT&#061;&#039;%n&#064;%m:%~ %# &#039;<\/span><br \/>\n    <span class=\"token key atrule\">dest<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;{{ ansible_user_dir }}\/.zshrc&#034;<\/span><\/p>\n<h4>Shell \u6279\u91cf\u63a8\u9001&#xff1a;<\/h4>\n<p><span class=\"token keyword\">for<\/span> <span class=\"token for-or-select variable\">host<\/span> <span class=\"token keyword\">in<\/span> server1 server2 server3<span class=\"token punctuation\">;<\/span> <span class=\"token keyword\">do<\/span><br \/>\n  <span class=\"token function\">scp<\/span> ~\/.zshrc-minimal <span class=\"token variable\">$host<\/span>:~\/.zshrc<br \/>\n<span class=\"token keyword\">done<\/span><\/p>\n<hr \/>\n<h3>\u516d\u3001\u5bb9\u5668\u73af\u5883\u9002\u914d<\/h3>\n<p>\u5728 Dockerfile \u4e2d\u5d4c\u5165&#xff1a;<\/p>\n<p>RUN apt-get update &amp;&amp; apt-get install -y zsh \\\\<br \/>\n &amp;&amp; echo &#039;HISTSIZE&#061;1000\\\\nsetopt inc_append_history\\\\nbindkey &#034;^[OA&#034; history-beginning-search-backward&#039; &gt; \/root\/.zshrc<br \/>\nENV SHELL&#061;\/usr\/bin\/zsh<\/p>\n<p>\u8fdb\u5165\u5bb9\u5668\u540e&#xff1a;<\/p>\n<p><span class=\"token function\">docker<\/span> <span class=\"token builtin class-name\">exec<\/span> -it myapp <span class=\"token function\">zsh<\/span><\/p>\n<p>\u2192 \u7acb\u5373\u83b7\u5f97\u9ad8\u6548\u4ea4\u4e92\u4f53\u9a8c\u3002<\/p>\n<hr \/>\n<h3>\u7ed3\u8bed&#xff1a;\u624b\u5de5\u8fd0\u7ef4&#xff0c;\u4e5f\u53ef\u4ee5\u5f88\u4f18\u96c5<\/h3>\n<p>\u5728\u81ea\u52a8\u5316\u6cdb\u6ee5\u7684\u65f6\u4ee3&#xff0c;\u771f\u6b63\u7684\u9ad8\u624b&#xff0c;\u65e2\u4f1a\u5199 Terraform&#xff0c;\u4e5f\u61c2\u5f97\u5982\u4f55\u8ba9\u6bcf\u4e00\u6b21\u624b\u52a8 SSH \u90fd\u9ad8\u6548\u65e0\u8bef\u3002<\/p>\n<p>zsh \u7684\u539f\u751f\u80fd\u529b&#xff0c;\u5c31\u662f\u4f60\u624b\u5de5\u8fd0\u7ef4\u7684\u201c\u9690\u5f62\u7fc5\u8180\u201d\u3002<br \/>\n\u4e0d\u9760\u63d2\u4ef6&#xff0c;\u4e0d\u9760\u7f51\u7edc&#xff0c;\u53ea\u9760\u5bf9\u7cfb\u7edf\u672c\u8d28\u7684\u7406\u89e3\u2014\u2014\u8fd9\u624d\u662f SRE \u7684\u7ec8\u6781\u6d6a\u6f2b\u3002<\/p>\n<p>\u672c\u6587\u914d\u7f6e\u5df2\u5728\u4ee5\u4e0b\u73af\u5883\u9a8c\u8bc1&#xff1a;<\/p>\n<ul>\n<li>Ubuntu 22.04 \/ CentOS 7 \/ Alpine 3.18<\/li>\n<li>AWS EC2 \/ \u963f\u91cc\u4e91 ECS \/ \u672c\u5730 Docker<\/li>\n<li>\u65e0 root \u6743\u9650\u573a\u666f<\/li>\n<\/ul>\n<p>\u4e00\u952e\u914d\u7f6e&#xff0c;\u624b\u5de5\u8d77\u98de\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f5c\u8005&#xff1a;\u65f7\u91ce\u8bf4 tikrok.cc \u7f51\u7ad9\u4f5c\u54c1\u5f00\u6e90\u4f5c\u8005<br \/>\n\u573a\u666f&#xff1a;\u4e91\u670d\u52a1\u5668&#xff08;CentOS \/ Ubuntu \/ Alpine&#xff09;\u3001\u5bb9\u5668\u73af\u5883\u3001\u6279\u91cf\u8fd0\u7ef4<br \/>\n\u76ee\u6807&#xff1a;5 \u79d2\u5b8c\u6210\u9ad8\u6548\u7ec8\u7aef\u914d\u7f6e&#xff0c;\u4e0d\u88c5\u63d2\u4ef6\u3001\u4e0d\u8054\u7f51\u3001\u4e0d\u63d0\u6743\u5728\u670d\u52a1\u7aef\u4e16\u754c&#xff0c;\u6211\u4eec\u8ffd\u6c42\u7684\u662f \u786e\u5b9a\u6027\u3001\u53ef\u5ba1\u8ba1\u3001\u6700\u5c0f\u5316\u653b\u51fb\u9762\u3002\u4f60\u4e0d\u9700\u8981\u82b1\u54e8\u7684\u63d0\u793a\u7b26&#xff0c;\u4e0d\u9700\u8981 GitHub \u63d2\u4ef6&#xff0c;\u66f4\u4e0d\u9700\u8981 root \u6743\u9650\u2014\u2014\u4f60\u53ea\u9700\u8981\u4e00\u4e2a\u80fd\u8ba9\u4f60\u5feb\u901f\u5b9a<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[77],"topic":[],"class_list":["post-61642","post","type-post","status-publish","format-standard","hentry","category-server","tag-ssh"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u670d\u52a1\u7aef\u4e00\u952e\u914d\u7f6e zsh\uff1a\u624b\u5de5\u8fd0\u7ef4\u8d77\u98de\uff08\u539f\u751f \u00b7 \u5b89\u5168 \u00b7 \u6781\u7b80\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/61642.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u670d\u52a1\u7aef\u4e00\u952e\u914d\u7f6e zsh\uff1a\u624b\u5de5\u8fd0\u7ef4\u8d77\u98de\uff08\u539f\u751f \u00b7 \u5b89\u5168 \u00b7 \u6781\u7b80\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u4f5c\u8005&#xff1a;\u65f7\u91ce\u8bf4 tikrok.cc \u7f51\u7ad9\u4f5c\u54c1\u5f00\u6e90\u4f5c\u8005 \u573a\u666f&#xff1a;\u4e91\u670d\u52a1\u5668&#xff08;CentOS \/ Ubuntu \/ Alpine&#xff09;\u3001\u5bb9\u5668\u73af\u5883\u3001\u6279\u91cf\u8fd0\u7ef4 \u76ee\u6807&#xff1a;5 \u79d2\u5b8c\u6210\u9ad8\u6548\u7ec8\u7aef\u914d\u7f6e&#xff0c;\u4e0d\u88c5\u63d2\u4ef6\u3001\u4e0d\u8054\u7f51\u3001\u4e0d\u63d0\u6743\u5728\u670d\u52a1\u7aef\u4e16\u754c&#xff0c;\u6211\u4eec\u8ffd\u6c42\u7684\u662f \u786e\u5b9a\u6027\u3001\u53ef\u5ba1\u8ba1\u3001\u6700\u5c0f\u5316\u653b\u51fb\u9762\u3002\u4f60\u4e0d\u9700\u8981\u82b1\u54e8\u7684\u63d0\u793a\u7b26&#xff0c;\u4e0d\u9700\u8981 GitHub \u63d2\u4ef6&#xff0c;\u66f4\u4e0d\u9700\u8981 root \u6743\u9650\u2014\u2014\u4f60\u53ea\u9700\u8981\u4e00\u4e2a\u80fd\u8ba9\u4f60\u5feb\u901f\u5b9a\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/61642.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-01-18T01:49:44+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/61642.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/61642.html\",\"name\":\"\u670d\u52a1\u7aef\u4e00\u952e\u914d\u7f6e zsh\uff1a\u624b\u5de5\u8fd0\u7ef4\u8d77\u98de\uff08\u539f\u751f \u00b7 \u5b89\u5168 \u00b7 \u6781\u7b80\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-01-18T01:49:44+00:00\",\"dateModified\":\"2026-01-18T01:49:44+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/61642.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/61642.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/61642.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u670d\u52a1\u7aef\u4e00\u952e\u914d\u7f6e zsh\uff1a\u624b\u5de5\u8fd0\u7ef4\u8d77\u98de\uff08\u539f\u751f \u00b7 \u5b89\u5168 \u00b7 \u6781\u7b80\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u670d\u52a1\u7aef\u4e00\u952e\u914d\u7f6e zsh\uff1a\u624b\u5de5\u8fd0\u7ef4\u8d77\u98de\uff08\u539f\u751f \u00b7 \u5b89\u5168 \u00b7 \u6781\u7b80\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/61642.html","og_locale":"zh_CN","og_type":"article","og_title":"\u670d\u52a1\u7aef\u4e00\u952e\u914d\u7f6e zsh\uff1a\u624b\u5de5\u8fd0\u7ef4\u8d77\u98de\uff08\u539f\u751f \u00b7 \u5b89\u5168 \u00b7 \u6781\u7b80\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u4f5c\u8005&#xff1a;\u65f7\u91ce\u8bf4 tikrok.cc \u7f51\u7ad9\u4f5c\u54c1\u5f00\u6e90\u4f5c\u8005 \u573a\u666f&#xff1a;\u4e91\u670d\u52a1\u5668&#xff08;CentOS \/ Ubuntu \/ Alpine&#xff09;\u3001\u5bb9\u5668\u73af\u5883\u3001\u6279\u91cf\u8fd0\u7ef4 \u76ee\u6807&#xff1a;5 \u79d2\u5b8c\u6210\u9ad8\u6548\u7ec8\u7aef\u914d\u7f6e&#xff0c;\u4e0d\u88c5\u63d2\u4ef6\u3001\u4e0d\u8054\u7f51\u3001\u4e0d\u63d0\u6743\u5728\u670d\u52a1\u7aef\u4e16\u754c&#xff0c;\u6211\u4eec\u8ffd\u6c42\u7684\u662f \u786e\u5b9a\u6027\u3001\u53ef\u5ba1\u8ba1\u3001\u6700\u5c0f\u5316\u653b\u51fb\u9762\u3002\u4f60\u4e0d\u9700\u8981\u82b1\u54e8\u7684\u63d0\u793a\u7b26&#xff0c;\u4e0d\u9700\u8981 GitHub \u63d2\u4ef6&#xff0c;\u66f4\u4e0d\u9700\u8981 root \u6743\u9650\u2014\u2014\u4f60\u53ea\u9700\u8981\u4e00\u4e2a\u80fd\u8ba9\u4f60\u5feb\u901f\u5b9a","og_url":"https:\/\/www.wsisp.com\/helps\/61642.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-01-18T01:49:44+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/61642.html","url":"https:\/\/www.wsisp.com\/helps\/61642.html","name":"\u670d\u52a1\u7aef\u4e00\u952e\u914d\u7f6e zsh\uff1a\u624b\u5de5\u8fd0\u7ef4\u8d77\u98de\uff08\u539f\u751f \u00b7 \u5b89\u5168 \u00b7 \u6781\u7b80\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-01-18T01:49:44+00:00","dateModified":"2026-01-18T01:49:44+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/61642.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/61642.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/61642.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u670d\u52a1\u7aef\u4e00\u952e\u914d\u7f6e zsh\uff1a\u624b\u5de5\u8fd0\u7ef4\u8d77\u98de\uff08\u539f\u751f \u00b7 \u5b89\u5168 \u00b7 \u6781\u7b80\uff09"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/61642","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=61642"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/61642\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=61642"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=61642"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=61642"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=61642"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}