{"id":51985,"date":"2024-12-03T15:45:36","date_gmt":"2024-12-03T07:45:36","guid":{"rendered":"https:\/\/fwq.ai\/blog\/51985\/"},"modified":"2024-12-03T15:45:36","modified_gmt":"2024-12-03T07:45:36","slug":"linux%e7%b3%bb%e7%bb%9f%e6%a0%b8%e5%bf%83%e5%91%bd%e4%bb%a4%e6%9c%89%e5%93%aa%e4%ba%9b","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/51985\/","title":{"rendered":"linux\u7cfb\u7edf\u6838\u5fc3\u547d\u4ee4\u6709\u54ea\u4e9b"},"content":{"rendered":"<p><b><\/b>     <\/p>\n<h1>linux\u7cfb\u7edf\u6838\u5fc3\u547d\u4ee4\u6709\u54ea\u4e9b<\/h1>\n<p>\u5728IT\u884c\u4e1a\u8fd9\u4e2a\u53d1\u5c55\u66f4\u65b0\u901f\u5ea6\u5f88\u5feb\u7684\u884c\u4e1a\uff0c\u53ea\u6709\u4e0d\u505c\u6b62\u7684\u5b66\u4e60\uff0c\u624d\u4e0d\u4f1a\u88ab\u884c\u4e1a\u6240\u6dd8\u6c70\u3002\u5982\u679c\u4f60\u662f\u6587\u7ae0\u5b66\u4e60\u8005\uff0c\u90a3\u4e48\u672c\u6587\u300alinux\u7cfb\u7edf\u6838\u5fc3\u547d\u4ee4\u6709\u54ea\u4e9b\u300b\u5c31\u5f88\u9002\u5408\u4f60\uff01\u672c\u7bc7\u5185\u5bb9\u4e3b\u8981\u5305\u62ec##content_title##\uff0c\u5e0c\u671b\u5bf9\u5927\u5bb6\u7684\u77e5\u8bc6\u79ef\u7d2f\u6709\u6240\u5e2e\u52a9\uff0c\u52a9\u529b\u5b9e\u6218\u5f00\u53d1\uff01<\/p>\n<h3>\u7cfb\u7edf\u6838\u5fc3\u547d\u4ee4<\/h3>\n<h3>cd<\/h3>\n<pre>&gt;&nbsp;Linux\u4e2d\u5207\u6362\u76ee\u5f55\u7684\u547d\u4ee4\u3002\n\n\u683c\u5f0f\uff1a\n\n&nbsp;&nbsp;cd&nbsp;&nbsp;\u8def\u5f84\uff08\u9700\u8981\u5207\u6362\u7684\u76ee\u5f55\u8def\u5f84\uff09\n\n\n\n\u8def\u5f84\uff1a\n\n-&nbsp;&nbsp;\u7edd\u5bf9\u8def\u5f84\uff1a\u4ece\u6839\u8def\u5f84\u5f00\u59cb\n-&nbsp;&nbsp;\u76f8\u5bf9\u8def\u5f84\uff1a\u4ece\u5f53\u524d\u76ee\u5f55\u5f00\u59cb\n\n-&nbsp;&nbsp;\u7279\u6b8a\u8def\u5f84\uff1a\n&nbsp;&nbsp;&nbsp;-&nbsp;.&nbsp;&nbsp;:&nbsp;\u5f53\u524d\u76ee\u5f55\n&nbsp;&nbsp;&nbsp;-&nbsp;..&nbsp;:<\/pre>\n<h3>ls<\/h3>\n<blockquote>\n<p>\u67e5\u770b\u5bf9\u5e94\u8def\u5f84\u4e0b\u7684\u6587\u4ef6\u3002<\/p>\n<\/blockquote>\n<pre>ls&nbsp;&nbsp;&nbsp;\u8def\u5f84\uff08\u9ed8\u8ba4\u662f\u5f53\u524d\u8def\u5f84\uff09\n\n\u8981\u6c42\uff1a\u5728\u5f53\u524d\u76ee\u5f55\u67e5\u770b\/root\u76ee\u5f55\u4e0b\u6709\u54ea\u4e9b\u6587\u4ef6\uff1f\n\n```\n\n\u53c2\u6570\uff1a\n\n-a&nbsp;:&nbsp;\u663e\u793a\u9690\u85cf\u6587\u4ef6\uff08\u9690\u85cf\u6587\u4ef6\uff1a\u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u4ee5.\u5f00\u5934\u7684\u6587\u4ef6\u53ca\u6587\u4ef6\u5939\u5c31\u53ef\u4ee5\u79f0\u4e4b\u4e3a\u9690\u85cf\u6587\u4ef6\u6216\u9690\u85cf\u6587\u4ef6\u5939\uff09\n\n```bash\n[root@localhost&nbsp;yum.repos.d]#&nbsp;ls&nbsp;-a&nbsp;..\/..\/root\n.&nbsp;&nbsp;..&nbsp;&nbsp;anaconda-ks.cfg&nbsp;&nbsp;.bash_history&nbsp;&nbsp;.bash_logout&nbsp;&nbsp;.bash_profile&nbsp;&nbsp;.bashrc&nbsp;&nbsp;.cshrc&nbsp;&nbsp;.tcshrc\n``\n\n-l&nbsp;:&nbsp;\u5217\u51fa\u6307\u5b9a\u8def\u5f84\u4e0b\u7684\u6587\u4ef6\u8be6\u7ec6\u4fe1\u606f\n\n```\n[root@localhost&nbsp;yum.repos.d]#&nbsp;ls&nbsp;-l&nbsp;..\/..\/root<\/pre>\n<h3>pwd<\/h3>\n<pre>&gt;&nbsp;\u663e\u793a\u5f53\u524d\u6240\u5728\u8def\u5f84\u3002\n\n[root@localhost&nbsp;yum.repos.d]#&nbsp;pwd\n\/etc\/yum.repos.d\n[root@localhost&nbsp;yum.repos.d]#&nbsp;cd&nbsp;\/root\/\n[root@localhost&nbsp;~]#&nbsp;pwd\n\/root\n[root@localhost&nbsp;~]#<\/pre>\n<h3>cat<\/h3>\n<pre>&gt;&nbsp;\u67e5\u770b\u6587\u4ef6\u5185\u5bb9\u7684\u547d\u4ee4\n\n\u683c\u5f0f\uff1a\n\ncat&nbsp;&nbsp;&nbsp;[\u8def\u5f84]\u6587\u4ef6\u540d\u79f0<\/pre>\n<h4>mv<\/h4>\n<blockquote>\n<p>\u79fb\u52a8\u4e00\u4e2a\u6587\u4ef6<\/p>\n<\/blockquote>\n<pre>\u683c\u5f0f\uff1a\nmv&nbsp;[\u539f\u6765\u7684\u6587\u4ef6\u8def\u5f84]&nbsp;&nbsp;[\u65b0\u7684\u6587\u4ef6\u7684\u8def\u5f84]\n\n\n\n\u53ef\u4ee5\u4f7f\u7528*\u5339\u914d\u591a\u4e2a\u6587\u4ef6\u3002\n\n```bash\n[root@localhost&nbsp;yum.repos.d]#&nbsp;mv&nbsp;CentOS-*&nbsp;backup\/\nmv:&nbsp;overwrite&nbsp;\u2018backup\/CentOS-Base.repo\u2019?&nbsp;y\n[root@localhost&nbsp;yum.repos.d]#&nbsp;ls&nbsp;-l\ntotal&nbsp;0\ndrwxr-xr-x.&nbsp;2&nbsp;root&nbsp;root&nbsp;187&nbsp;Mar&nbsp;&nbsp;3&nbsp;16:14&nbsp;backup\n[root@localhost&nbsp;yum.repos.d]#<\/pre>\n<h3>\u67e5\u770b\u7cfb\u7edf\u7248\u672c<\/h3>\n<pre>[root@localhost&nbsp;yum.repos.d]#&nbsp;cat&nbsp;\/etc\/redhat-release&nbsp;\nCentOS&nbsp;Linux&nbsp;release&nbsp;7.6.1810&nbsp;(Core)<\/pre>\n<p>\u7ec8\u4e8e\u4ecb\u7ecd\u5b8c\u5566\uff01\u5c0f\u4f19\u4f34\u4eec\uff0c\u8fd9\u7bc7\u5173\u4e8e\u300alinux\u7cfb\u7edf\u6838\u5fc3\u547d\u4ee4\u6709\u54ea\u4e9b\u300b\u7684\u4ecb\u7ecd\u5e94\u8be5\u8ba9\u4f60\u6536\u83b7\u591a\u591a\u4e86\u5427\uff01\u6b22\u8fce\u5927\u5bb6\u6536\u85cf\u6216\u5206\u4eab\u7ed9\u66f4\u591a\u9700\u8981\u5b66\u4e60\u7684\u670b\u53cb\u5427~\u7c73\u4e91\u516c\u4f17\u53f7\u4e5f\u4f1a\u53d1\u5e03\u6587\u7ae0\u76f8\u5173\u77e5\u8bc6\uff0c\u5feb\u6765\u5173\u6ce8\u5427\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>linux\u7cfb\u7edf\u6838\u5fc3\u547d\u4ee4\u6709\u54ea\u4e9b \u5728IT\u884c\u4e1a\u8fd9\u4e2a\u53d1\u5c55\u66f4\u65b0\u901f\u5ea6\u5f88\u5feb\u7684\u884c\u4e1a\uff0c\u53ea\u6709\u4e0d\u505c\u6b62\u7684\u5b66\u4e60\uff0c\u624d\u4e0d\u4f1a\u88ab\u884c\u4e1a\u6240\u6dd8\u6c70\u3002\u5982\u679c\u4f60\u662f\u6587\u7ae0\u5b66\u4e60\u8005\uff0c\u90a3\u4e48\u672c\u6587\u300alinux\u7cfb\u7edf\u6838\u5fc3\u547d\u4ee4\u6709\u54ea\u4e9b\u300b\u5c31\u5f88\u9002\u5408\u4f60\uff01\u672c\u7bc7\u5185\u5bb9\u4e3b\u8981\u5305\u62ec##content_title##\uff0c\u5e0c\u671b\u5bf9\u5927\u5bb6\u7684\u77e5\u8bc6\u79ef\u7d2f\u6709\u6240\u5e2e\u52a9\uff0c\u52a9\u529b\u5b9e\u6218\u5f00\u53d1\uff01 \u7cfb\u7edf\u6838\u5fc3\u547d\u4ee4 cd &gt;&nbsp;Linux\u4e2d\u5207\u6362\u76ee\u5f55\u7684\u547d\u4ee4\u3002 \u683c\u5f0f\uff1a &nbsp;&nbsp;cd&nbsp;&nbsp;\u8def\u5f84\uff08\u9700\u8981\u5207\u6362\u7684\u76ee\u5f55\u8def\u5f84\uff09 \u8def\u5f84\uff1a &#8211;&nbsp;&nbsp;\u7edd\u5bf9\u8def\u5f84\uff1a\u4ece\u6839\u8def\u5f84\u5f00\u59cb &#8211;&nbsp;&nbsp;\u76f8\u5bf9\u8def\u5f84\uff1a\u4ece\u5f53\u524d\u76ee\u5f55\u5f00\u59cb &#8211;&nbsp;&nbsp;\u7279\u6b8a\u8def\u5f84\uff1a &nbsp;&nbsp;&nbsp;&#8211;&nbsp;.&nbsp;&nbsp;:&nbsp;\u5f53\u524d\u76ee\u5f55 &nbsp;&nbsp;&nbsp;&#8211;&nbsp;..&nbsp;: ls \u67e5\u770b\u5bf9\u5e94\u8def\u5f84\u4e0b\u7684\u6587\u4ef6\u3002 ls&nbsp;&nbsp;&nbsp;\u8def\u5f84\uff08\u9ed8\u8ba4\u662f\u5f53\u524d\u8def\u5f84\uff09 \u8981\u6c42\uff1a\u5728\u5f53\u524d\u76ee\u5f55\u67e5\u770b\/root\u76ee\u5f55\u4e0b\u6709\u54ea\u4e9b\u6587\u4ef6\uff1f &#8220;` \u53c2\u6570\uff1a -a&nbsp;:&nbsp;\u663e\u793a\u9690\u85cf\u6587\u4ef6\uff08\u9690\u85cf\u6587\u4ef6\uff1a\u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u4ee5.\u5f00\u5934\u7684\u6587\u4ef6\u53ca\u6587\u4ef6\u5939\u5c31\u53ef\u4ee5\u79f0\u4e4b\u4e3a\u9690\u85cf\u6587\u4ef6\u6216\u9690\u85cf\u6587\u4ef6\u5939\uff09 &#8220;`bash [root@localhost&nbsp;yum.repos.d]#&nbsp;ls&nbsp;-a&nbsp;..\/..\/root .&nbsp;&nbsp;..&nbsp;&nbsp;anaconda-ks.cfg&nbsp;&nbsp;.bash_history&nbsp;&nbsp;.bash_logout&nbsp;&nbsp;.bash_profile&nbsp;&nbsp;.bashrc&nbsp;&nbsp;.cshrc&nbsp;&nbsp;.tcshrc &#8220; -l&nbsp;:&nbsp;\u5217\u51fa\u6307\u5b9a\u8def\u5f84\u4e0b\u7684\u6587\u4ef6\u8be6\u7ec6\u4fe1\u606f &#8220;` [root@localhost&nbsp;yum.repos.d]#&nbsp;ls&nbsp;-l&nbsp;..\/..\/root pwd &gt;&nbsp;\u663e\u793a\u5f53\u524d\u6240\u5728\u8def\u5f84\u3002 [root@localhost&nbsp;yum.repos.d]#&nbsp;pwd \/etc\/yum.repos.d [root@localhost&nbsp;yum.repos.d]#&nbsp;cd&nbsp;\/root\/ [root@localhost&nbsp;~]#&nbsp;pwd \/root [root@localhost&nbsp;~]# cat &gt;&nbsp;\u67e5\u770b\u6587\u4ef6\u5185\u5bb9\u7684\u547d\u4ee4 \u683c\u5f0f\uff1a cat&nbsp;&nbsp;&nbsp;[\u8def\u5f84]\u6587\u4ef6\u540d\u79f0 mv \u79fb\u52a8\u4e00\u4e2a\u6587\u4ef6 \u683c\u5f0f\uff1a mv&nbsp;[\u539f\u6765\u7684\u6587\u4ef6\u8def\u5f84]&nbsp;&nbsp;[\u65b0\u7684\u6587\u4ef6\u7684\u8def\u5f84] \u53ef\u4ee5\u4f7f\u7528*\u5339\u914d\u591a\u4e2a\u6587\u4ef6\u3002 &#8220;`bash [root@localhost&nbsp;yum.repos.d]#&nbsp;mv&nbsp;CentOS-*&nbsp;backup\/ mv:&nbsp;overwrite&nbsp;\u2018backup\/CentOS-Base.repo\u2019?&nbsp;y [root@localhost&nbsp;yum.repos.d]#&nbsp;ls&nbsp;-l total&nbsp;0 drwxr-xr-x.&nbsp;2&nbsp;root&nbsp;root&nbsp;187&nbsp;Mar&nbsp;&nbsp;3&nbsp;16:14&nbsp;backup [root@localhost&nbsp;yum.repos.d]# \u67e5\u770b\u7cfb\u7edf\u7248\u672c [root@localhost&nbsp;yum.repos.d]#&nbsp;cat&nbsp;\/etc\/redhat-release&nbsp; CentOS&nbsp;Linux&nbsp;release&nbsp;7.6.1810&nbsp;(Core) \u7ec8\u4e8e\u4ecb\u7ecd\u5b8c\u5566\uff01\u5c0f\u4f19\u4f34\u4eec\uff0c\u8fd9\u7bc7\u5173\u4e8e\u300alinux\u7cfb\u7edf\u6838\u5fc3\u547d\u4ee4\u6709\u54ea\u4e9b\u300b\u7684\u4ecb\u7ecd\u5e94\u8be5\u8ba9\u4f60\u6536\u83b7\u591a\u591a\u4e86\u5427\uff01\u6b22\u8fce\u5927\u5bb6\u6536\u85cf\u6216\u5206\u4eab\u7ed9\u66f4\u591a\u9700\u8981\u5b66\u4e60\u7684\u670b\u53cb\u5427~\u7c73\u4e91\u516c\u4f17\u53f7\u4e5f\u4f1a\u53d1\u5e03\u6587\u7ae0\u76f8\u5173\u77e5\u8bc6\uff0c\u5feb\u6765\u5173\u6ce8\u5427\uff01<\/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-51985","post","type-post","status-publish","format-standard","hentry","category-os"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/51985","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=51985"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/51985\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=51985"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=51985"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=51985"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}