{"id":5401,"date":"2022-04-21T15:38:05","date_gmt":"2022-04-21T07:38:05","guid":{"rendered":"http:\/\/123.57.164.21\/?p=5401"},"modified":"2022-04-21T15:38:05","modified_gmt":"2022-04-21T07:38:05","slug":"%e7%9c%8b%e5%ae%8c%e8%bf%99%e7%af%87linux%e5%9f%ba%e6%9c%ac%e7%9a%84%e6%93%8d%e4%bd%9c%e5%b0%b1%e4%bc%9a%e4%ba%86","status":"publish","type":"post","link":"https:\/\/92it.top\/?p=5401","title":{"rendered":"\u770b\u5b8c\u8fd9\u7bc7Linux\u57fa\u672c\u7684\u64cd\u4f5c\u5c31\u4f1a\u4e86"},"content":{"rendered":"\n<p>\u8f6c\u8f7d\uff1ahttps:\/\/github.com\/ZhongFuCheng3y\/athena<\/p>\n\n\n\n<h6 class=\"wp-block-heading\"><strong>\u524d\u8a00<\/strong><\/h6>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u8fd9\u4e2a\u5b66\u671f\u5f00\u4e86Linux\u7684\u8bfe\u7a0b\u4e86\uff0c\u6388\u8bfe\u7684\u8001\u5e08\u4e5f\u662f\u6bd4\u8f83\u8d1f\u8d23\u4efb\u7684\u4e00\u4f4d\u3002\u603b\u7684\u6765\u8bf4\u4e5f\u7b97\u662f\u6bd4\u8f83\u7cfb\u7edf\u5730\u5b66\u4e60\u4e86\u4e00\u4e0bLinux\u4e86~~~<\/p>\n\n\n\n<p>\u672c\u6587\u7ae0\u4e3b\u8981\u662f<strong>\u603b\u7ed3Linux\u7684\u57fa\u7840\u64cd\u4f5c\u4ee5\u53ca\u4e00\u4e9b\u7b80\u5355\u7684\u6982\u5ff5<\/strong>~\u5982\u679c\u4e0d\u719f\u6089\u7684\u540c\u5b66\u53ef\u4e0b\u4e2aLinux\u6765\u73a9\u73a9(\u6216\u8005\u53bb\u4e70\u4e00\u4e2a\u670d\u52a1\u5668\u73a9\u73a9\u3010\u5b66\u751f\u7248\u7684\u4e0d\u662f\u5f88\u8d35\u3011)\uff0c\u5bf9\u4e8e\u5f00\u53d1\u8005\u6765\u8bf4\uff0c\u80fd\u4f7f\u7528Linux\u505a\u4e00\u4e9b\u57fa\u672c\u7684\u64cd\u4f5c\u662f\u5fc5\u8981\u7684\uff01<\/p>\n\n\n\n<p>\u90a3\u4e48\u63a5\u4e0b\u6765\u5c31\u5f00\u59cb\u5427\uff0c\u5f53\u7136\u4e86<strong>\u6211\u7684Linux\u4ec5\u4ec5\u662f\u5165\u95e8\u6c34\u5e73<\/strong>\uff0c\u5982\u679c\u6709\u9519\u7684\u5730\u65b9\u8fd8\u9700\u8bf7\u5927\u5bb6\u591a\u591a\u5305\u6db5\uff0c\u5e76\u4e0d\u541d\u5728\u8bc4\u8bba\u533a\u6307\u51fa\u9519\u8bef~<\/p>\n\n\n\n<h6 class=\"wp-block-heading\"><strong>\u4e00\u3001\u4e3a\u4ec0\u4e48\u6211\u4eec\u8981\u5b66\u4e60Linux<\/strong><\/h6>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u76f8\u4fe1<strong>\u5927\u90e8\u5206\u4eba<\/strong>\u7684PC\u7aef\u90fd\u662f\u7528Windows\u7cfb\u7edf\u7684\uff0c\u90a3\u6211\u4eec\u4e3a\u4ec0\u4e48\u8981\u5b66\u4e60Linux\u8fd9\u4e2a\u64cd\u4f5c\u7cfb\u7edf\u5462\uff1f\uff1f\uff1fWindows\u56fe\u5f62\u5316\u754c\u9762\u505a\u5f97\u8fd9\u4e48\u597d\uff0c\u65e5\u5e38\u57fa\u672c\u4f7f\u7528\u7684\u8bdd\uff0c\u5b66\u4e60\u6210\u672c\u51e0\u4e4e\u4e3a\u96f6\u3002<\/p>\n\n\n\n<p>\u800cLinux\u4e0d\u4e00\u6837\uff0c<strong>\u53ef\u80fd<\/strong>\u521a\u63a5\u89e6Linux\u7684\u4eba\u4f1a\u8ba4\u4e3a\uff1aLinux\u597d\u9ebb\u70e6\u54e6\uff0c\u4e0d\u597d\u73a9\uff0c\u90fd\u662f\u5b57\u7b26\u754c\u9762\u3002\u4e0d\u76f4\u89c2\u3001\u8fd9\u4e2a\u7834\u7cfb\u7edf\u662f\u7528\u6765\u5e72\u561b\u7684~~<\/p>\n\n\n\n<p>\u65e5\u5e38\u7528\u7684\u8bddWindows\u662f\u6bd4\u8f83\u987a\u624b\u7684\uff0c\u4f46\u662f\u6211\u4eec\u8981\u77e5\u9053\u7684\u662f\uff1a\u6211\u4eec\u5f00\u53d1\u51fa\u6765\u7684\u7a0b\u5e8f<strong>\u4e00\u822c\u90fd\u662f\u653e\u5728Linux\u4e0b\u8fd0\u884c<\/strong>\u7684\u3002<\/p>\n\n\n\n<p>\u90a3\u53ef\u80fd\u5c31\u4f1a\u6709\u4eba\u63d0\u51fa\u7591\u95ee\u4e86\uff1aWindows\u540c\u6837\u662f\u64cd\u4f5c\u7cfb\u7edf\uff0c<strong>\u4e3a\u5565\u8981\u653e\u5728Linux\u4e0b\uff0c\u800c\u4e0d\u653e\u5728Windows\u4e0b\u5462<\/strong>\uff1f\uff1f\u76f8\u4fe1Windows\u4e5f\u662f\u53ef\u4ee5\u8fd0\u884c\u6211\u4eec\u5199\u51fa\u6765\u7684\u7a0b\u5e8f\u7684\u3002<\/p>\n\n\n\n<p>\u6211\u603b\u7ed3\u4e86Linux\u7684<strong>\u51e0\u4e2a\u4f18\u70b9<\/strong>\uff1a<\/p>\n\n\n\n<ol><li>\u514d\u8d39<\/li><li>\u5f88\u591a\u8f6f\u4ef6\u539f\u751f\u662f\u5728Linux\u4e0b\u8fd0\u884c\u7684\uff0c\u5e9e\u5927\u7684\u793e\u533a\u652f\u6301\uff0c<strong>\u751f\u6001\u73af\u5883\u597d<\/strong>\u3002<\/li><li><strong>\u5f00\u6e90<\/strong>\uff0c\u53ef\u88ab\u5b9a\u5236\uff0c\u5f00\u653e\uff0c<strong>\u591a\u7528\u6237\u7684\u7f51\u7edc\u64cd\u4f5c\u7cfb\u7edf<\/strong>\u3002<\/li><li><strong>\u76f8\u5bf9\u5b89\u5168\u7a33\u5b9a<\/strong><\/li><\/ol>\n\n\n\n<p>\u53c2\u8003\u8d44\u6599\uff1a<\/p>\n\n\n\n<ul><li>https:\/\/www.zhihu.com\/question\/19738282<\/li><\/ul>\n\n\n\n<p>\u6240\u4ee5\u5f00\u53d1\u8005<strong>\u9009\u62e9\u4e86Linux<\/strong>\u6765\u8dd1\u6211\u4eec\u81ea\u5df1\u5199\u51fa\u6765\u7684\u7a0b\u5e8f\u3002<\/p>\n\n\n\n<h6 class=\"wp-block-heading\"><strong>\u4e8c\u3001Linux\u7684\u57fa\u7840\u77e5\u8bc6<\/strong><\/h6>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p><strong>Linux\u7cfb\u7edf\u7684\u7ec4\u6210<\/strong>\uff1a<\/p>\n\n\n\n<ol><li><strong>linux\u5185\u6838<\/strong>\uff08linus \u56e2\u961f\u7ba1\u7406\uff09<\/li><li><strong>shell<\/strong>\uff1a\u7528\u6237\u4e0e\u5185\u6838\u4ea4\u4e92\u7684\u63a5\u53e3<\/li><li><strong>\u6587\u4ef6\u7cfb\u7edf<\/strong>\uff1aext3\u3001ext4\u7b49\u3002windows \u6709 fat32 &nbsp;\u3001ntfs<\/li><li><strong>\u7b2c\u4e09\u65b9\u5e94\u7528\u8f6f\u4ef6<\/strong><\/li><\/ol>\n\n\n\n<p><strong>2.1 Shell\u7684\u57fa\u672c\u77e5\u8bc6<\/strong><\/p>\n\n\n\n<p>\u9664\u4e86Shell\u3001\u5176\u4ed6\u7684\u90fd\u5e94\u8be5\u633a\u597d\u61c2\u7684\uff0c\u90a3\u4e48<strong>Shell\u662f\u4ec0\u4e48\u4e1c\u897f\u5462<\/strong>\uff1f\uff1f\uff1f<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-60-1024x95.png\" alt=\"\" class=\"wp-image-5402\" width=\"738\" height=\"68\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-60-1024x95.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-60-300x28.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-60-768x71.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-60-830x77.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-60-230x21.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-60-350x32.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-60-480x44.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-60.png 1254w\" sizes=\"(max-width: 738px) 100vw, 738px\" \/><\/figure><\/div>\n\n\n\n<p>Shell\u53ef\u4ee5\u6267\u884c\uff1a<\/p>\n\n\n\n<ul><li><strong>\u5185\u90e8\u547d\u4ee4<\/strong><\/li><li><strong>\u5e94\u7528\u7a0b\u5e8f<\/strong><\/li><li><strong>shell\u811a\u672c<\/strong><\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-61.png\" alt=\"\" class=\"wp-image-5403\" width=\"349\" height=\"332\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-61.png 916w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-61-300x286.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-61-768x731.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-61-830x790.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-61-230x219.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-61-350x333.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-61-480x457.png 480w\" sizes=\"(max-width: 349px) 100vw, 349px\" \/><\/figure><\/div>\n\n\n\n<p>\u4f7f\u7528<code>type<\/code>\u547d\u4ee4\u53ef\u4ee5<strong>\u533a\u5206<\/strong>\u5185\u90e8\u547d\u4ee4\u548c\u5916\u90e8\u547d\u4ee4<\/p>\n\n\n\n<p>\u4e8e\u662f\u4e4e\uff0c\u6211\u4eec\u5229\u7528Shell\u5c31\u53ef\u4ee5\u5e72\u4e0b\u9762\u8fd9\u4e9b\u4e8b\u4e86\uff1a<\/p>\n\n\n\n<ul><li><strong>\u547d\u4ee4\u884c\u89e3\u91ca(\u8fd9\u662f\u7528\u5f97\u6700\u591a\u7684\uff01)<\/strong><\/li><li>\u547d\u4ee4\u7684\u591a\u79cd\u6267\u884c\u987a\u5e8f<\/li><li>\u901a\u914d\u7b26\uff08 wild-card characters \uff09<\/li><li>\u547d\u4ee4\u8865\u5168\u3001\u522b\u540d\u673a\u5236\u3001\u547d\u4ee4\u5386\u53f2<\/li><li>I\/O\u91cd\u5b9a\u5411\uff08 Input\/output redirection \uff09<\/li><li>\u7ba1\u9053\uff08 pipes \uff09<\/li><li>\u547d\u4ee4\u66ff\u6362\uff08<code><\/code> \u6216$( ) \uff09<\/li><li>Shell\u7f16\u7a0b\u8bed\u8a00\uff08 Shell Script \uff09<\/li><\/ul>\n\n\n\n<p>Shell\u7684\u4e3b\u8981\u7248\u672c\u6709\u4ee5\u4e0b\u8fd9\u4e48\u591a\uff1a<\/p>\n\n\n\n<ul><li>\u6211\u4eec<strong>\u5e38\u7528(\u9ed8\u8ba4)<\/strong>\u7684\u5c31\u662f<strong>bash<\/strong>(bourne again shell)<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-62-1024x564.png\" alt=\"\" class=\"wp-image-5404\" width=\"572\" height=\"314\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-62-1024x564.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-62-300x165.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-62-768x423.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-62-830x457.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-62-230x127.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-62-350x193.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-62-480x264.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-62.png 1228w\" sizes=\"(max-width: 572px) 100vw, 572px\" \/><\/figure><\/div>\n\n\n\n<p>\u4f7f\u7528<code>ps<\/code>\u547d\u4ee4\u89c2\u5bdf\u6b63\u5728\u6267\u884c\u7684shell<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-63.png\" alt=\"\" class=\"wp-image-5405\" width=\"337\" height=\"116\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-63.png 512w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-63-300x103.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-63-230x79.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-63-350x120.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-63-480x165.png 480w\" sizes=\"(max-width: 337px) 100vw, 337px\" \/><\/figure><\/div>\n\n\n\n<p><strong>2.2 Linux\u57fa\u672c\u76ee\u5f55\u7ed3\u6784<\/strong><\/p>\n\n\n\n<p>\u5728Windows\u4e0b\uff0c\u4f1a\u6709<strong>\u57fa\u672c\u7684\u76ee\u5f55\u7ed3\u6784<\/strong>\u7684\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-65-1024x759.png\" alt=\"\" class=\"wp-image-5407\" width=\"520\" height=\"385\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-65-1024x759.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-65-300x222.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-65-768x569.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-65-830x615.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-65-230x171.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-65-350x260.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-65-480x356.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-65.png 1238w\" sizes=\"(max-width: 520px) 100vw, 520px\" \/><\/figure><\/div>\n\n\n\n<p>Linux\u4e0b\u4e5f\u4e0d\u4f8b\u5916\u4e86\uff0c\u4e5f\u662f\u6709\u57fa\u672c\u7684\u76ee\u5f55\u7ed3\u6784\u7684\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-66-1024x242.png\" alt=\"\" class=\"wp-image-5408\" width=\"527\" height=\"124\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-66-1024x242.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-66-300x71.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-66-768x181.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-66-830x196.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-66-230x54.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-66-350x83.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-66-480x113.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-66.png 1202w\" sizes=\"(max-width: 527px) 100vw, 527px\" \/><\/figure><\/div>\n\n\n\n<p>Linux \u6587\u4ef6\u7cfb\u7edf\u662f\u4e00\u4e2a<strong>\u76ee\u5f55\u6811\u7684\u7ed3\u6784<\/strong>\uff0c\u6587\u4ef6\u7cfb\u7edf\u7ed3\u6784\u4ece\u4e00\u4e2a\u6839\u76ee\u5f55\u5f00\u59cb\uff0c\u6839\u76ee\u5f55\u4e0b\u53ef\u4ee5\u6709\u4efb\u610f\u591a\u4e2a\u6587\u4ef6\u548c\u5b50\u76ee\u5f55\uff0c\u5b50\u76ee\u5f55\u4e2d\u53c8\u53ef\u4ee5\u6709\u4efb\u610f\u591a\u4e2a\u6587\u4ef6\u548c\u5b50\u76ee\u5f55<\/p>\n\n\n\n<ul><li><strong>bin &nbsp; \u5b58\u653e\u4e8c\u8fdb\u5236\u53ef\u6267\u884c\u6587\u4ef6(ls,cat,mkdir\u7b49)<\/strong><\/li><li>boot &nbsp;\u5b58\u653e\u7528\u4e8e\u7cfb\u7edf\u5f15\u5bfc\u65f6\u4f7f\u7528\u7684\u5404\u79cd\u6587\u4ef6<\/li><li>dev &nbsp; \u7528\u4e8e\u5b58\u653e\u8bbe\u5907\u6587\u4ef6<\/li><li><strong>etc &nbsp; &nbsp;\u5b58\u653e\u7cfb\u7edf\u914d\u7f6e\u6587\u4ef6<\/strong><\/li><li>home &nbsp;\u5b58\u653e\u6240\u6709\u7528\u6237\u6587\u4ef6\u7684\u6839\u76ee\u5f55<\/li><li>lib &nbsp; &nbsp;\u5b58\u653e\u8ddf\u6587\u4ef6\u7cfb\u7edf\u4e2d\u7684\u7a0b\u5e8f\u8fd0\u884c\u6240\u9700\u8981\u7684\u5171\u4eab\u5e93\u53ca\u5185\u6838\u6a21\u5757<\/li><li>mnt &nbsp; \u7cfb\u7edf\u7ba1\u7406\u5458\u5b89\u88c5\u4e34\u65f6\u6587\u4ef6\u7cfb\u7edf\u7684\u5b89\u88c5\u70b9<\/li><li><strong>opt &nbsp; &nbsp;\u989d\u5916\u5b89\u88c5\u7684\u53ef\u9009\u5e94\u7528\u7a0b\u5e8f\u5305\u6240\u653e\u7f6e\u7684\u4f4d\u7f6e<\/strong><\/li><li>proc &nbsp; \u865a\u62df\u6587\u4ef6\u7cfb\u7edf\uff0c\u5b58\u653e\u5f53\u524d\u5185\u5b58\u7684\u6620\u5c04<\/li><li><strong>root &nbsp; \u8d85\u7ea7\u7528\u6237\u76ee\u5f55<\/strong><\/li><li>sbin &nbsp; \u5b58\u653e\u4e8c\u8fdb\u5236\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u53ea\u6709root\u624d\u80fd\u8bbf\u95ee<\/li><li>tmp &nbsp; \u7528\u4e8e\u5b58\u653e\u5404\u79cd\u4e34\u65f6\u6587\u4ef6<\/li><li>usr &nbsp; &nbsp;\u7528\u4e8e\u5b58\u653e\u7cfb\u7edf\u5e94\u7528\u7a0b\u5e8f\uff0c\u6bd4\u8f83\u91cd\u8981\u7684\u76ee\u5f55\/usr\/local \u672c\u5730\u7ba1\u7406\u5458\u8f6f\u4ef6\u5b89\u88c5\u76ee\u5f55<\/li><li>var &nbsp; &nbsp;\u7528\u4e8e\u5b58\u653e\u8fd0\u884c\u65f6\u9700\u8981\u6539\u53d8\u6570\u636e\u7684\u6587\u4ef6<\/li><\/ul>\n\n\n\n<p><strong>2.3 \u547d\u4ee4\u57fa\u672c\u683c\u5f0f<\/strong><\/p>\n\n\n\n<p><code>cmd &nbsp;[options] &nbsp;[arguments]<\/code>\uff0coptions\u79f0\u4e3a\u9009\u9879\uff0carguments\u79f0\u4e3a\u53c2\u6570<\/p>\n\n\n\n<p>\u9009\u9879\u548c\u53c2\u6570\u90fd\u4f5c\u4e3aShell\u547d\u4ee4\u6267\u884c\u65f6\u7684\u8f93\u5165\uff0c\u5b83\u4eec<strong>\u4e4b\u95f4\u7528\u7a7a\u683c\u5206\u9694\u5f00<\/strong>\u3002<\/p>\n\n\n\n<ul><li>Linux\u662f<strong>\u533a\u5206\u5927\u5c0f<\/strong>\u5199\u7684<\/li><\/ul>\n\n\n\n<p><strong>\u4e00\u822c\u6765\u8bf4<\/strong>\uff0c\u540e\u9762\u8ddf\u7684\u9009\u9879\u5982\u679c<strong>\u5355\u5b57\u7b26<\/strong>\u9009\u9879\u524d\u4f7f\u7528<strong>\u4e00\u4e2a<\/strong><code>\u51cf\u53f7-<\/code>\u3002<strong>\u5355\u8bcd\u9009\u9879<\/strong>\u524d\u4f7f\u7528\u4e24\u4e2a<code>\u51cf\u53f7--<\/code><\/p>\n\n\n\n<ul><li>\u8fd9\u662f\u4e00\u822c\u7684\u60c5\u51b5\uff0c\u6709\u4e9b\u547d\u4ee4\u8fd8\u662f\u4e0d\u5f52\u5c5e\u8fd9\u79cd\u89c4\u5f8b\u7684(\u76f8\u5bf9\u8f83\u5c11)~~~<\/li><li>\u4f8b\u5b50\uff1a<code>ls -a<\/code>\u548c<code>ls -all<\/code>\uff0c<code>a<\/code> \u5355\u4e2a\u5b57\u7b26\u4f7f\u7528\u4e00\u4e2a<code>-<\/code>\uff0c\u4e00\u4e2a\u5355\u8bcd<code>all<\/code> \u4f7f\u7528\u4e24\u4e2a<code>--<\/code><\/li><\/ul>\n\n\n\n<p>\u5728Linux\u4e2d\uff0c<strong>\u53ef\u6267\u884c\u7684\u6587\u4ef6<\/strong>\u4e5f\u8fdb\u884c\u4e86\u5206\u7c7b\uff1a<\/p>\n\n\n\n<ul><li><strong>\u5185\u7f6e\u547d\u4ee4<\/strong>\uff1a\u51fa\u4e8e\u6548\u7387\u7684\u8003\u8651\uff0c\u5c06\u4e00\u4e9b\u5e38\u7528\u547d\u4ee4\u7684\u89e3\u91ca\u7a0b\u5e8f<strong>\u6784\u9020\u5728Shell\u5185\u90e8<\/strong>\u3002<\/li><li><strong>\u5916\u7f6e\u547d\u4ee4<\/strong>\uff1a\u5b58\u653e\u5728\/bin\u3001\/sbin\u76ee\u5f55\u4e0b\u7684\u547d\u4ee4<\/li><li><strong>\u5b9e\u7528\u7a0b\u5e8f<\/strong>\uff1a\u5b58\u653e\u5728\/usr\/bin\u3001\/usr\/sbin\u3001\/usr\/share\u3001\/usr\/local\/bin\u7b49\u76ee\u5f55\u4e0b\u7684\u5b9e\u7528\u7a0b\u5e8f<\/li><li><strong>\u7528\u6237\u7a0b\u5e8f<\/strong>\uff1a\u7528\u6237\u7a0b\u5e8f\u7ecf\u8fc7\u7f16\u8bd1\u751f\u6210\u53ef\u6267\u884c\u6587\u4ef6\u540e\uff0c\u53ef\u4f5c\u4e3aShell\u547d\u4ee4\u8fd0\u884c<\/li><li><strong>Shell\u811a\u672c<\/strong>\uff1a\u7531Shell\u8bed\u8a00\u7f16\u5199\u7684\u6279\u5904\u7406\u6587\u4ef6\uff0c\u53ef\u4f5c\u4e3aShell\u547d\u4ee4\u8fd0\u884c<\/li><\/ul>\n\n\n\n<p><strong>2.4 \u901a\u914d\u7b26<\/strong><\/p>\n\n\n\n<p>\u5b66\u8fc7\u4e00\u4e9b\u6b63\u5219\u8868\u8fbe\u5f0f\u7684\u6216\u8005\u6709\u70b9\u57fa\u7840\u7684\u540c\u5b66\u5bf9\u901a\u914d\u7b26\u5e94\u8be5\u5c31\u4e0d\u964c\u751f\u7684\u4e86\uff0c\u5728Linux\u4e5f\u6709\u901a\u914d\u7b26(\u5728\u641c\u7d22\u7684\u65f6\u5019\u633a\u6709\u7528\u7684)<\/p>\n\n\n\n<ul><li>*\uff1a\u5339\u914d\u4efb\u4f55\u5b57\u7b26\u548c\u4efb\u4f55\u6570\u76ee\u7684\u5b57\u7b26<\/li><li>?\uff1a\u5339\u914d\u5355\u4e00\u6570\u76ee\u7684\u4efb\u4f55\u5b57\u7b26<\/li><li>[ ]\uff1a\u5339\u914d[ ]\u4e4b\u5185\u7684\u4efb\u610f\u4e00\u4e2a\u5b57\u7b26<\/li><li>[! ]\uff1a\u5339\u914d\u9664\u4e86[! ]\u4e4b\u5916\u7684\u4efb\u610f\u4e00\u4e2a\u5b57\u7b26\uff0c!\u8868\u793a\u975e\u7684\u610f\u601d<\/li><\/ul>\n\n\n\n<p><strong>2.5 \u6587\u4ef6\u7684\u7c7b\u578b<\/strong><\/p>\n\n\n\n<p>\u5728Linux\u4e0b\u6587\u4ef6\u7684\u7c7b\u578b\u6709\u8fd9\u4e48\u591a\uff1a<\/p>\n\n\n\n<ul><li><strong>\u666e\u901a\u6587\u4ef6<\/strong><code>-<\/code><\/li><li><strong>\u76ee\u5f55<\/strong><code>d<\/code><\/li><li><strong>\u7b26\u53f7\u94fe\u63a5<\/strong> <code>l<\/code><ul><li>\u786c\u94fe\u63a5\uff1a \u4e0e\u666e\u901a\u6587\u4ef6\u6ca1\u4ec0\u4e48\u4e0d\u540c\uff0cinode \u90fd\u6307\u5411\u540c\u4e00\u4e2a\u6587\u4ef6\u5728\u786c\u76d8\u4e2d\u7684\u533a\u5757<\/li><li>\u8f6f\u94fe\u63a5\uff1a \u4fdd\u5b58\u4e86\u5176\u4ee3\u8868\u7684\u6587\u4ef6\u7684\u7edd\u5bf9\u8def\u5f84\uff0c\u662f\u53e6\u5916\u4e00\u79cd\u6587\u4ef6\uff0c\u5728\u786c\u76d8\u4e0a\u6709\u72ec\u7acb\u7684\u533a\u5757\uff0c\u8bbf\u95ee\u65f6\u66ff\u6362\u81ea\u8eab\u8def\u5f84(\u7b80\u5355\u5730\u7406\u89e3\u4e3a Windows \u4e2d\u5e38\u89c1\u7684\u5feb\u6377\u65b9\u5f0f)\u3002<\/li><\/ul><\/li><li>\u5b57\u7b26\u8bbe\u5907\u6587\u4ef6 <code>c<\/code><\/li><li>\u5757\u8bbe\u5907\u6587\u4ef6<code>b<\/code><\/li><li>\u5957\u63a5\u5b57<code>s<\/code><\/li><li>\u547d\u540d\u7ba1\u9053<code>p<\/code><\/li><\/ul>\n\n\n\n<p>\u6211\u4eec\u5e38\u89c1\u7684\u5c31\u662f\u666e\u901a\u6587\u4ef6\uff0c\u76ee\u5f55\u548c\u7b26\u53f7\u94fe\u63a5\u3002\u5176\u4ed6\u7684\u4e86\u89e3\u4e00\u4e0b\u5373\u53ef~<\/p>\n\n\n\n<p>\u7b26\u53f7\u94fe\u63a5\u53c2\u8003\u8d44\u6599\uff1a<\/p>\n\n\n\n<ul><li>https:\/\/www.jianshu.com\/p\/dde6a01c4094<\/li><\/ul>\n\n\n\n<p><strong>2.5.1 \u7528\u6237\u4e3b\u76ee\u5f55<\/strong><\/p>\n\n\n\n<p>\u53ef\u80fd\u5728\u7f51\u4e0a\u67e5\u9605\u8d44\u6599\u7684\u65f6\u5019\u4f1a\u51fa\u73b0<strong>\u7528\u6237\u4e3b\u76ee\u5f55<\/strong>\u8fd9\u4e48\u4e00\u4e2a\u540d\u8bcd\uff0c\u90a3\u4ed6\u662f\u4ec0\u4e48\u5462\uff1f\uff1f\uff1f<\/p>\n\n\n\n<p>\u524d\u9762\u5df2\u7ecf\u8bf4\u4e86\uff0c\u6211\u4eec\u7684Linux\u662f<strong>\u591a\u7528\u6237\u7684\u7f51\u7edc\u7cfb\u7edf<\/strong>\uff01\u6240\u4ee5\uff0c\u6211\u4eec\u53ef\u4ee5\u5728Linux\u4e0b\u521b\u5efa\u591a\u4e2a\u7528\u6237\uff0c<strong>\u6bcf\u4e2a\u7528\u6237\u90fd\u4f1a\u6709\u81ea\u5df1\u4e13\u5c5e\u7684\u7a7a\u95f4<\/strong>\u3002<\/p>\n\n\n\n<ul><li>\u6240\u4ee5\uff0c\u5728\u521b\u5efa\u7528\u6237\u65f6\uff0c\u7cfb\u7edf\u7ba1\u7406\u5458<strong>\u4f1a\u7ed9\u6bcf\u4e2a\u7528\u6237\u5efa\u7acb\u4e00\u4e2a\u4e3b\u76ee\u5f55<\/strong>\uff0c\u901a\u5e38\u5728<code>\/home\/<\/code>\u76ee\u5f55\u4e0b<\/li><li>\u6bd4\u5982\uff1a\u7528\u6237osmond\u7684\u4e3b\u76ee\u5f55\u4e3a\uff1a<code>\/home\/osmond<\/code><\/li><\/ul>\n\n\n\n<p>\u7528\u6237<strong>\u5bf9\u81ea\u5df1\u4e3b\u76ee\u5f55\u7684\u6587\u4ef6\u62e5\u6709\u6240\u6709\u6743<\/strong>\uff0c\u53ef\u4ee5\u5728\u81ea\u5df1\u7684\u4e3b\u76ee\u5f55\u4e0b\u8fdb\u884c\u76f8\u5173\u64cd\u4f5c\u3002<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">\u4e09\u3001\u5e38\u7528\u7684\u547d\u4ee4<\/h6>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u4e0a\u9762\u8bf4\u4e86\u4e00\u5806\u7684\u57fa\u7840\u6982\u5ff5\uff0c\u8fd9\u662f\u7ed9\u6211\u4eec\u6572\u547d\u4ee4\u4e4b\u524d\u6253\u4e86\u4e00\u70b9\u57fa\u7840\uff0c\u5728\u6572\u547d\u4ee4\u7684\u540c\u65f6\u4e5f\u4f1a\u9047\u5230\u4e00\u4e9b\u6bd4\u8f83\u91cd\u8981\u7684\u77e5\u8bc6\u70b9\u7684\u3002\u90a3\u5c31\u5230\u65f6\u5019\u518d\u8bf4\u8bf4\u4e86~~~<\/p>\n\n\n\n<p><strong>3.1 \u5e38\u7528\u7684\u6587\u4ef6\u3001\u76ee\u5f55\u64cd\u4f5c\u547d\u4ee4<\/strong><\/p>\n\n\n\n<p>\u8fd9\u662f\u6211\u4eec<strong>\u4f7f\u7528\u5f97\u6700\u591a<\/strong>\u7684\u547d\u4ee4\u4e86\uff0c<strong>Linux\u6700\u57fa\u7840\u7684\u547d\u4ee4<\/strong>\uff01<\/p>\n\n\n\n<ul><li>\u53ef\u7528 &nbsp;<code>pwd<\/code>\u547d\u4ee4\u67e5\u770b\u7528\u6237\u7684\u5f53\u524d\u76ee\u5f55<\/li><li>\u53ef\u7528 <code>cd<\/code> \u547d\u4ee4\u6765\u5207\u6362\u76ee\u5f55<\/li><li><code>.<\/code>\u8868\u793a\u5f53\u524d\u76ee\u5f55<\/li><li><code>..<\/code> \u8868\u793a\u5f53\u524d\u76ee\u5f55\u7684\u4e0a\u4e00\u7ea7\u76ee\u5f55\uff08\u7236\u76ee\u5f55\uff09<\/li><li><code>-<\/code>\u8868\u793a\u7528 cd \u547d\u4ee4\u5207\u6362\u76ee\u5f55<strong>\u524d<\/strong>\u6240\u5728\u7684\u76ee\u5f55<\/li><li><code>~<\/code> \u8868\u793a<strong>\u7528\u6237\u4e3b\u76ee\u5f55<\/strong>\u7684\u7edd\u5bf9\u8def\u5f84\u540d<\/li><\/ul>\n\n\n\n<p><strong>\u7edd\u5bf9\u8def\u5f84\uff1a<\/strong><\/p>\n\n\n\n<ul><li>\u4ee5\u659c\u7ebf\uff08\/\uff09\u5f00\u5934 \uff0c\u63cf\u8ff0\u5230\u6587\u4ef6\u4f4d\u7f6e\u7684<strong>\u5b8c\u6574\u8bf4\u660e<\/strong> \uff0c\u4efb\u4f55\u65f6\u5019\u4f60\u60f3\u6307\u5b9a\u6587\u4ef6\u540d\u7684\u65f6\u5019\u90fd\u53ef\u4ee5\u4f7f\u7528<\/li><\/ul>\n\n\n\n<p><strong>\u76f8\u5bf9\u8def\u5f84 \uff1a<\/strong><\/p>\n\n\n\n<ul><li>\u4e0d\u4ee5\u659c\u7ebf\uff08\/\uff09\u5f00\u5934 \uff0c\u6307\u5b9a<strong>\u76f8\u5bf9\u4e8e\u4f60\u7684\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u800c\u8a00\u7684\u4f4d\u7f6e<\/strong> \uff0c\u53ef\u4ee5\u88ab\u7528\u4f5c\u6307\u5b9a\u6587\u4ef6\u540d\u7684\u7b80\u6377\u65b9\u5f0f<\/li><\/ul>\n\n\n\n<p>tips:<strong>\u8f93\u5165\u547d\u4ee4\u7684\u65f6\u5019\u8981\u5e38\u7528tab\u952e\u6765\u8865\u5168<\/strong><\/p>\n\n\n\n<ul><li><code>ls<\/code>\uff1a\u663e\u793a\u6587\u4ef6\u6216\u76ee\u5f55\u4fe1\u606f<\/li><li><code>mkdir<\/code>\uff1a\u5f53\u524d\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2a\u7a7a\u76ee\u5f55<\/li><li><code>rmdir<\/code>\uff1a\u8981\u6c42\u76ee\u5f55\u4e3a\u7a7a<\/li><li><code>touch<\/code>\uff1a\u751f\u6210\u4e00\u4e2a\u7a7a\u6587\u4ef6\u6216\u66f4\u6539\u6587\u4ef6\u7684\u65f6\u95f4<\/li><li><code>cp<\/code>\uff1a\u590d\u5236\u6587\u4ef6\u6216\u76ee\u5f55<\/li><li><code>mv<\/code>\uff1a\u79fb\u52a8\u6587\u4ef6\u6216\u76ee\u5f55\u3001\u6587\u4ef6\u6216\u76ee\u5f55\u6539\u540d<\/li><li><code>rm<\/code>\uff1a\u5220\u9664\u6587\u4ef6\u6216\u76ee\u5f55<\/li><li><code>ln<\/code>\uff1a\u5efa\u7acb\u94fe\u63a5\u6587\u4ef6<\/li><li><code>find<\/code>\uff1a\u67e5\u627e\u6587\u4ef6<\/li><li><code>file\/stat<\/code>\uff1a\u67e5\u770b\u6587\u4ef6\u7c7b\u578b\u6216\u6587\u4ef6\u5c5e\u6027\u4fe1\u606f<\/li><li><code>cat\uff1a<\/code>\u67e5\u770b\u6587\u672c\u6587\u4ef6\u5185\u5bb9<\/li><li><code>more\uff1a<\/code>\u53ef\u4ee5\u5206\u9875\u770b<\/li><li><code>less\uff1a<\/code>\u4e0d\u4ec5\u53ef\u4ee5\u5206\u9875\uff0c\u8fd8\u53ef\u4ee5\u65b9\u4fbf\u5730\u641c\u7d22\uff0c\u56de\u7ffb\u7b49\u64cd\u4f5c<\/li><li><code>tail -10<\/code>\uff1a \u67e5\u770b\u6587\u4ef6\u7684\u5c3e\u90e8\u768410\u884c<\/li><li><code>head -20<\/code>\uff1a\u67e5\u770b\u6587\u4ef6\u7684\u5934\u90e820\u884c<\/li><li><code>echo<\/code>\uff1a\u628a\u5185\u5bb9\u91cd\u5b9a\u5411\u5230\u6307\u5b9a\u7684\u6587\u4ef6\u4e2d \uff0c\u6709\u5219\u6253\u5f00\uff0c\u65e0\u5219\u521b\u5efa<\/li><li><code>\u7ba1\u9053\u547d\u4ee4 |<\/code> \uff1a\u5c06\u524d\u9762\u7684\u7ed3\u679c\u7ed9\u540e\u9762\u7684\u547d\u4ee4\uff0c\u4f8b\u5982\uff1a<code>ls -la | wc<\/code>\uff0c\u5c06ls\u7684\u7ed3\u679c\u52a0\u6cb9wc\u547d\u4ee4\u6765\u7edf\u8ba1\u5b57\u6570<\/li><li><code>\u91cd\u5b9a\u5411 &gt; \u662f\u8986\u76d6\u6a21\u5f0f\uff0c&gt;&gt; \u662f\u8ffd\u52a0\u6a21\u5f0f<\/code>\uff0c\u4f8b\u5982\uff1a<code>echo \"Java3y,zhen de hen xihuan ni\" &gt; qingshu.txt<\/code>\u628a\u5de6\u8fb9\u7684\u8f93\u51fa\u653e\u5230\u53f3\u8fb9\u7684\u6587\u4ef6\u91cc\u53bb<\/li><\/ul>\n\n\n\n<p>\u5b66\u4e86\u8fd9\u4e9b\u547d\u4ee4\u6211\u4eec\u80fd\u5e72\u561b\uff1f<strong>\u5176\u5b9e\u5c31\u662f\u5728Windows\u4e0b\u590d\u5236\u6587\u4ef6\u3001\u7c98\u8d34\u6587\u4ef6\u3001\u521b\u5efa\u6587\u4ef6\u3001\u67e5\u770b\u6587\u4ef6\u8fd9\u51e0\u79cd<\/strong>~~~<\/p>\n\n\n\n<p><strong>3.2 \u6587\u4ef6\u6253\u5305\u548c\u538b\u7f29\u547d\u4ee4<\/strong><\/p>\n\n\n\n<p>\u5728Windows\u64cd\u4f5c\u7cfb\u7edf\u4e0b\uff0c\u6211\u4eec\u4f1a\u4f7f\u7528WinRAR\u6216\u8005\u5feb\u538b\u7b49\u7b49\u7684\u538b\u7f29\u8f6f\u4ef6\u6765\u8fdb\u884c\u538b\u7f29\u6216\u8005\u89e3\u538b\u3002<\/p>\n\n\n\n<p>\u5728Linux\u4e0b<strong>\u5f53\u7136\u4e5f\u5b58\u5728\u538b\u7f29\u6216\u89e3\u538b\u7684\u64cd\u4f5c\u54af<\/strong>\uff0c\u4e0b\u9762\u6211\u4eec\u5c31\u6765\u5b66\u4e60\u4e00\u4e0b\u5728Linux\u4e0b\u662f\u600e\u4e48\u538b\u7f29\u548c\u89e3\u538b\u7684\uff01<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-67-1024x549.png\" alt=\"\" class=\"wp-image-5412\" width=\"456\" height=\"244\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-67-1024x549.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-67-300x161.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-67-768x412.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-67-830x445.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-67-230x123.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-67-350x188.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-67-480x258.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-67.png 1230w\" sizes=\"(max-width: 456px) 100vw, 456px\" \/><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-68-1024x633.png\" alt=\"\" class=\"wp-image-5413\" width=\"445\" height=\"275\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-68-1024x633.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-68-300x185.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-68-768x475.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-68-830x513.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-68-230x142.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-68-350x216.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-68-480x297.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-68.png 1236w\" sizes=\"(max-width: 445px) 100vw, 445px\" \/><\/figure><\/div>\n\n\n\n<p>\u538b\u7f29\u7684\u65b9\u5f0f\u4e5f\u662f\u6709\u597d\u51e0\u79cd\uff0c\u6211\u4eec<strong>\u5e38\u7528<\/strong>\u7684\u6709\u4e0b\u9762\u8fd9\u4e09\u79cd\uff1a<\/p>\n\n\n\n<ul><li>gzip<\/li><li>bzip2<\/li><li>tar<\/li><\/ul>\n\n\n\n<p>\u5e38\u7528\u7684\u538b\u7f29\u7684\u547d\u4ee4\u5c31\u6709\uff1a<\/p>\n\n\n\n<ul><li><code>gzip filename<\/code><\/li><li><code>bzip2 filename<\/code><\/li><li><code>tar -czvf filename<\/code><\/li><\/ul>\n\n\n\n<p>\u5e38\u7528\u7684\u89e3\u538b\u547d\u4ee4\u6709\uff1a<\/p>\n\n\n\n<ul><li><code>gzip -d filename.gz<\/code><\/li><li><code>bzip2 -d filename.bz2<\/code><\/li><li><code>tar -xzvf filename.tar.gz<\/code><\/li><\/ul>\n\n\n\n<p><strong>3.3 \u6b63\u5219\u8868\u8fbe\u5f0f+grep<\/strong><\/p>\n\n\n\n<p>\u4e0a\u9762\u6211\u4eec\u5df2\u7ecf\u5b66\u8fc7\u4e86<code>cat\u3001more\u3001less\u3001tail<\/code>\u8fd9\u4e9b\u67e5\u770b\u6587\u672c\u6587\u4ef6\u7684\u547d\u4ee4\u4e86\uff0c\u4f46\u662f\u6211\u60f3<strong>\u5feb\u901f\u67e5\u770b\u8fd9\u4e2a\u6587\u672c\u6587\u4ef6\u4e0b\u7684\u67d0\u4e9b\u5173\u952e\u5b57\u662f\u5426\u5b58\u5728<\/strong>\uff0c\u90a3\u600e\u4e48\u529e\uff1f\uff1f\uff1f<\/p>\n\n\n\n<p>\u5728Windows\u4e0b\u5c31\u6bd4\u8f83\u7b80\u5355\u7684\uff0c\u51e0\u4e4e\u6240\u6709\u7684\u6587\u672c\u7f16\u8f91\u5668(\u8bb0\u4e8b\u672c)\u90fd\u652f\u6301<code>CTRL+F<\/code>\uff0c\u5f80\u91cc\u9762\u8f93\u5165\u5173\u952e\u5b57\u5c31\u53ef\u67e5\u627e\u51fa\u6765\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-69-1024x362.png\" alt=\"\" class=\"wp-image-5414\" width=\"564\" height=\"198\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-69-1024x362.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-69-300x106.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-69-768x271.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-69-830x293.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-69-230x81.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-69-350x124.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-69-480x170.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-69.png 1240w\" sizes=\"(max-width: 564px) 100vw, 564px\" \/><\/figure><\/div>\n\n\n\n<p>\u90a3\u5728Linux\u4e0b\uff0c\u6ca1\u6709\u56fe\u5f62\u754c\u9762\uff0c\u6ca1\u6709<code>CTRL+F<\/code>\u7684\u60c5\u51b5\u4e0b\uff0c<strong>\u5982\u679c\u4e0d\u61c2\u4e00\u4e9b\u547d\u4ee4\u7684\u8bdd\uff0c\u90a3\u8fd8\u771f\u662f\u96be\u627e\u5bf9\u5e94\u7684\u5b57\u7b26\u51fa\u6765<\/strong>\u3002\u4e0b\u9762\u6211\u5c31\u6765\u8bf4\u8bf4\u5982\u4f55\u5feb\u901f<strong>\u67e5\u627e\u4e00\u4e2a\u6587\u672c\u6587\u4ef6\u4e0b\u7684\u67d0\u4e9b\u5b57\u7b26<\/strong>\u3002<\/p>\n\n\n\n<p><strong>3.3.1 \u6b63\u5219\u8868\u8fbe\u5f0f<\/strong><\/p>\n\n\n\n<p>\u9996\u5148\u6211\u4eec\u5c31\u6765\u8bf4\u8bf4\u6b63\u5219\u8868\u8fbe\u5f0f\uff0c\u5982\u679c\u63a5\u89e6\u8fc7\u7684\u540c\u5b66\u5c31\u77e5\u9053\uff1a\u8fd9\u73a9\u610f\u5e76\u4e0d\u597d\u8bb0\u3002\u4e00\u65e6\u4e0d\u7528\u5c31\u5f88\u5bb9\u6613\u5c31\u5fd8\u8bb0\u4e86\uff0c\u6240\u4ee5\u53ea\u80fd\u5728\u7528\u7684\u65f6\u5019\u67e5\u67e5\u4e86~~~\u6240\u4ee5\u4e0b\u9762\u6211\u5c31\u76f4\u63a5\u7ed9\u51fa\u4e00\u4e9b\u89c4\u5219\u4e86\uff0c\u4e0d\u591a\u8bf4\u5566\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-70-879x1024.png\" alt=\"\" class=\"wp-image-5415\" width=\"365\" height=\"424\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-70-879x1024.png 879w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-70-258x300.png 258w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-70-768x894.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-70-830x967.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-70-230x268.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-70-350x408.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-70-480x559.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-70.png 1252w\" sizes=\"(max-width: 365px) 100vw, 365px\" \/><\/figure><\/div>\n\n\n\n<p><strong>3.3.2 grep\u547d\u4ee4<\/strong><\/p>\n\n\n\n<p>grep(global search regular expression)\u662f\u4e00\u4e2a<strong>\u5f3a\u5927\u7684\u6587\u672c\u641c\u7d22\u5de5\u5177<\/strong>\u3002grep \u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u641c\u7d22\u6587\u672c\uff0c\u5e76\u628a\u5339\u914d\u7684\u884c\u6253\u5370\u51fa\u6765\u3002<\/p>\n\n\n\n<p>\u683c\u5f0f\uff1a<code>grep [options] PATTERN [FILE...]<\/code><\/p>\n\n\n\n<ul><li>PATTERN \u662f\u67e5\u627e\u6761\u4ef6\uff1a<strong>\u53ef\u4ee5\u662f\u666e\u901a\u5b57\u7b26\u4e32\u3001\u53ef\u4ee5\u662f\u6b63\u5219\u8868\u8fbe\u5f0f<\/strong>\uff0c\u901a\u5e38\u7528\u5355\u5f15\u53f7\u5c06RE\u62ec\u8d77\u6765\u3002<\/li><li>FILE \u662f\u8981\u67e5\u627e\u7684\u6587\u4ef6\uff0c\u53ef\u4ee5\u662f\u7528\u7a7a\u683c\u95f4\u9694\u7684\u591a\u4e2a\u6587\u4ef6\uff0c\u4e5f\u53ef\u662f\u4f7f\u7528Shell\u7684\u901a\u914d\u7b26\u5728\u591a\u4e2a\u6587\u4ef6\u4e2d\u67e5\u627ePATTERN\uff0c\u7701\u7565\u65f6\u8868\u793a\u5728\u6807\u51c6\u8f93\u5165\u4e2d\u67e5\u627e\u3002<\/li><li>grep\u547d\u4ee4\u4e0d\u4f1a\u5bf9\u8f93\u5165\u6587\u4ef6\u8fdb\u884c\u4efb\u4f55\u4fee\u6539\u6216\u5f71\u54cd\uff0c\u53ef\u4ee5\u4f7f\u7528\u8f93\u51fa\u91cd\u5b9a\u5411\u5c06\u7ed3\u679c\u5b58\u4e3a\u6587\u4ef6<\/li><\/ul>\n\n\n\n<p>\u4f8b\u5b50\uff1a<\/p>\n\n\n\n<ul><li>\u5728\u6587\u4ef6 myfile \u4e2d\u67e5\u627e\u5305\u542b\u5b57\u7b26\u4e32 mystr\u7684\u884c<ul><li><code>grep -n mystr myfile<\/code><\/li><\/ul><\/li><li>\u663e\u793a myfile \u4e2d\u7b2c\u4e00\u4e2a\u5b57\u7b26\u4e3a\u5b57\u6bcd\u7684\u6240\u6709\u884c<ul><li><code>grep &nbsp;'^[a-zA-Z]' &nbsp;myfile<\/code><\/li><\/ul><\/li><li>\u5728\u6587\u4ef6 myfile \u4e2d\u67e5\u627e\u9996\u5b57\u7b26\u4e0d\u662f # \u7684\u884c\uff08<strong>\u5373\u8fc7\u6ee4\u6389\u6ce8\u91ca\u884c<\/strong>\uff09<ul><li><code>grep -v '^#' myfile<\/code><\/li><\/ul><\/li><li>\u5217\u51fa\/etc\u76ee\u5f55\uff08\u5305\u62ec\u5b50\u76ee\u5f55\uff09\u4e0b\u6240\u6709\u6587\u4ef6\u5185\u5bb9\u4e2d\u5305\u542b\u5b57\u7b26\u4e32\u201croot\u201d\u7684\u6587\u4ef6\u540d<ul><li><code>grep -lr root \/etc\/*<\/code><\/li><\/ul><\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-71-1024x134.png\" alt=\"\" class=\"wp-image-5416\" width=\"614\" height=\"79\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-71-1024x134.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-71-300x39.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-71-230x30.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-71-350x46.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-71-480x63.png 480w\" sizes=\"(max-width: 614px) 100vw, 614px\" \/><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-72-1024x644.png\" alt=\"\" class=\"wp-image-5417\" width=\"601\" height=\"378\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-72-1024x644.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-72-300x189.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-72-768x483.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-72-830x522.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-72-230x145.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-72-350x220.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-72-480x302.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-72.png 1126w\" sizes=\"(max-width: 601px) 100vw, 601px\" \/><\/figure><\/div>\n\n\n\n<p><strong>3.4 \u51e0\u79cd\u63d0\u9ad8\u5de5\u4f5c\u6548\u7387\u7684\u65b9\u6cd5<\/strong><\/p>\n\n\n\n<ul><li><strong>\u81ea\u52a8\u8865\u5168\u547d\u4ee4<\/strong><ul><li>TAB\u952e<\/li><\/ul><\/li><li><strong>\u5386\u53f2\u547d\u4ee4<\/strong><ul><li>\u4e0a\u4e0b\u7bad\u5934\u952e<\/li><\/ul><\/li><li><strong>\u522b\u540dalias<\/strong><\/li><\/ul>\n\n\n\n<p>\u8fd9\u91cc\u611f\u89c9\u8981\u8bf4\u8bf4\u7684\u5c31\u53ea\u6709\u522b\u540dalias\u4e86\uff0c\u6211\u4eec\u4e0b\u9762\u770b\u770b\u4f8b\u5b50\u5c31\u61c2\u4e86\uff01<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-73-1024x135.png\" alt=\"\" class=\"wp-image-5418\" width=\"586\" height=\"76\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-73-1024x135.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-73-300x39.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-73-768x101.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-73-830x109.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-73-230x30.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-73-350x46.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-73-480x63.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-73.png 1248w\" sizes=\"(max-width: 586px) 100vw, 586px\" \/><\/figure><\/div>\n\n\n\n<p><strong>3.5 Shell\u53d8\u91cf \u548c Shell\u73af\u5883<\/strong><\/p>\n\n\n\n<p>\u5728Windows\u4e0b\u6709\u7528\u6237\u7684\u73af\u5883\u53d8\u91cf\uff0c\u7cfb\u7edf\u7684\u73af\u5883\u53d8\u91cf\u3002\u5728Linux\u4e00\u6837\u4e5f\u662f\u6709\u7684\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-74-953x1024.png\" alt=\"\" class=\"wp-image-5419\" width=\"486\" height=\"522\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-74-953x1024.png 953w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-74-279x300.png 279w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-74-768x825.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-74-830x891.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-74-230x247.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-74-350x376.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-74-480x516.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-74.png 1134w\" sizes=\"(max-width: 486px) 100vw, 486px\" \/><\/figure><\/div>\n\n\n\n<p>Shell \u53d8\u91cf\u5927\u81f4\u53ef\u4ee5<strong>\u5206\u4e3a\u4e09\u7c7b<\/strong>\uff1a<\/p>\n\n\n\n<ul><li><strong>\u5185\u90e8\u53d8\u91cf<\/strong>\uff1a\u7531\u7cfb\u7edf\u63d0\u4f9b\uff0c\u7528\u6237\u53ea\u80fd\u4f7f\u7528\u4e0d\u80fd\u4fee\u6539\u3002<ul><li>?<\/li><li>GROUPS<\/li><\/ul><\/li><li><strong>\u73af\u5883\u53d8\u91cf<\/strong>\uff1a\u8fd9\u4e9b\u53d8\u91cf\u51b3\u5b9a\u4e86\u7528\u6237\u5de5\u4f5c\u7684\u73af\u5883\uff0c\u5b83\u4eec\u4e0d\u9700\u8981\u7528\u6237\u53bb\u5b9a\u4e49\uff0c\u53ef\u4ee5\u76f4\u63a5\u5728 shell \u4e2d\u4f7f\u7528\uff0c\u5176\u4e2d\u67d0\u4e9b\u53d8\u91cf\u7528\u6237\u53ef\u4ee5\u4fee\u6539\u3002<\/li><li><strong>\u7528\u6237\u53d8\u91cf<\/strong>\uff1a\u7531\u7528\u6237\u5efa\u7acb\u548c\u4fee\u6539\uff0c\u5728 shell \u811a\u672c\u7f16\u5199\u4e2d\u4f1a\u7ecf\u5e38\u7528\u5230\u3002<ul><li><code>varName=Value<\/code><\/li><li><code>export &nbsp;varName=Value<\/code><\/li><li>\u53d8\u91cf\u8d4b\u503c\uff08\u5b9a\u4e49\u53d8\u91cf\uff09<\/li><li>\u5f15\u7528\u53d8\u91cf<code>$varName<\/code><\/li><\/ul><\/li><\/ul>\n\n\n\n<p>Shell\u53d8\u91cf\u7684<strong>\u4f5c\u7528\u57df<\/strong>\uff1a<\/p>\n\n\n\n<ul><li><strong>\u5c40\u90e8\u53d8\u91cf<\/strong>\u7684\u4f5c\u7528\u8303\u56f4\u4ec5\u4ec5<strong>\u9650\u5236\u5728\u5176\u547d\u4ee4\u884c\u6240\u5728\u7684Shell\u6216Shell\u811a\u672c\u6587\u4ef6\u4e2d<\/strong>\uff1b<\/li><li><strong>\u5168\u5c40\u53d8\u91cf<\/strong>\u7684\u4f5c\u7528\u8303\u56f4\u5219\u5305\u62ec<strong>\u672cShell\u8fdb\u7a0b\u53ca\u5176\u6240\u6709\u5b50\u8fdb\u7a0b<\/strong>\u3002<\/li><li>\u5c40\u90e8\u53d8\u91cf\u4e0e\u5168\u5c40\u53d8\u91cf<strong>\u4e92\u6362<\/strong>\uff1a\u53ef\u4ee5\u4f7f\u7528 <code>export<\/code> \u5185\u7f6e\u547d\u4ee4\u5c06\u5c40\u90e8\u53d8\u91cf\u8bbe\u7f6e\u4e3a\u5168\u5c40\u53d8\u91cf\u3002 \u53ef\u4ee5\u4f7f\u7528 <code>export<\/code> \u5185\u7f6e\u547d\u4ee4\u5c06\u5168\u5c40\u53d8\u91cf\u8bbe\u7f6e\u4e3a\u5c40\u90e8\u53d8\u91cf\u3002<\/li><\/ul>\n\n\n\n<p><strong>export\u547d\u4ee4<\/strong>\uff1a<\/p>\n\n\n\n<ul><li><strong>\u663e\u793a<\/strong>\u5f53\u524dShell\u53ef\u89c1\u7684\u5168\u5c40\u53d8\u91cf<ul><li><code>export [-p]<\/code><\/li><\/ul><\/li><li><strong>\u5b9a\u4e49\u53d8\u91cf\u503c\u7684\u540c\u65f6\u58f0\u660e\u4e3a\u5168\u5c40\u53d8\u91cf<\/strong>\u3002<ul><li><code>export &lt;\u53d8\u91cf\u540d1=\u503c1&gt; &nbsp;[&lt;\u53d8\u91cf\u540d2=\u503c2&gt; ...]<\/code><\/li><\/ul><\/li><li>\u58f0\u660e\u5df2\u7ecf\u8d4b\u503c\u7684\u67d0\u4e2a\uff08\u4e9b\uff09<strong>\u5c40\u90e8\u53d8\u91cf\u4e3a\u5168\u5c40\u53d8\u91cf<\/strong>\u3002<ul><li><code>export &lt;\u53d8\u91cf\u540d1&gt; [&lt;\u53d8\u91cf\u540d2&gt; ...]<\/code><\/li><\/ul><\/li><li>\u58f0\u660e\u5df2\u7ecf\u8d4b\u503c\u7684\u67d0\u4e2a\uff08\u4e9b\uff09<strong>\u5168\u5c40\u53d8\u91cf\u4e3a\u5c40\u90e8\u53d8\u91cf<\/strong>\u3002<ul><li><code>export -n &lt;\u53d8\u91cf\u540d1&gt; [&lt;\u53d8\u91cf\u540d2&gt; ...]<\/code><\/li><\/ul><\/li><\/ul>\n\n\n\n<p>Shell\u73af\u5883\u53d8\u91cf\uff1a<\/p>\n\n\n\n<ul><li>\u73af\u5883\u53d8\u91cf\u5b9a\u4e49 Shell \u7684<strong>\u8fd0\u884c\u73af\u5883<\/strong>\uff0c\u4fdd\u8bc1 Shell \u547d\u4ee4\u7684\u6b63\u786e\u6267\u884c\u3002<\/li><li>Shell\u7528\u73af\u5883\u53d8\u91cf\u6765\u786e\u5b9a\u67e5\u627e\u8def\u5f84\u3001\u6ce8\u518c\u76ee\u5f55\u3001\u7ec8\u7aef\u7c7b\u578b\u3001\u7ec8\u7aef\u540d\u79f0\u3001\u7528\u6237\u540d\u7b49\u3002<\/li><li>\u6240\u6709\u73af\u5883\u53d8\u91cf<strong>\u90fd\u662f\u5168\u5c40\u53d8\u91cf<\/strong>\uff08\u5373\u53ef\u4ee5\u4f20\u9012\u7ed9 Shell \u7684\u5b50\u8fdb\u7a0b\uff09\uff0c\u5e76\u53ef\u4ee5\u7531\u7528\u6237\u91cd\u65b0\u8bbe\u7f6e\u3002<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-75-1024x712.png\" alt=\"\" class=\"wp-image-5421\" width=\"490\" height=\"340\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-75-1024x712.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-75-300x209.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-75-768x534.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-75-830x577.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-75-230x160.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-75-350x243.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-75-480x334.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-75.png 1248w\" sizes=\"(max-width: 490px) 100vw, 490px\" \/><\/figure><\/div>\n\n\n\n<p><strong>Shell\u53d8\u91cf\uff1a\u67e5\u8be2\u3001\u663e\u793a\u548c\u53d6\u6d88<\/strong>\uff1a<\/p>\n\n\n\n<ul><li>\u663e\u793a\u5f53\u524d\u5df2\u7ecf\u5b9a\u4e49\u7684\u6240\u6709\u53d8\u91cf<ul><li>\u6240\u6709<strong>\u73af\u5883\u53d8\u91cf<\/strong>\uff1a<code>env<\/code><\/li><li>\u6240\u6709<strong>\u53d8\u91cf\u548c\u51fd\u6570<\/strong>\uff08\u5305\u62ec\u73af\u5883\u53d8\u91cf\uff09 \uff1a<code>set<\/code><\/li><\/ul><\/li><li>\u663e\u793a\u67d0\uff08\u4e9b\uff09\u4e2a\u53d8\u91cf\u7684\u503c<ul><li><code>echo &nbsp;$NAME1 &nbsp;[$NAME2 \u2026\u2026]<\/code><\/li><\/ul><\/li><li>\u53d6\u6d88\u53d8\u91cf\u7684\u58f0\u660e\u6216\u8d4b\u503c<ul><li><code>unset &nbsp;&lt;NAME&gt;<\/code><\/li><\/ul><\/li><\/ul>\n\n\n\n<p>\u73af\u5883\u53d8\u91cf\u7684\u503c\u4e00\u822c\u60c5\u51b5\u4e0b\uff0c\u53ef\u4ee5\u4fee\u6539\u3002\u4f46\u4e00\u5b9a\u8981<strong>\u614e\u91cd\u4fee\u6539<\/strong>\uff0c\u56e0\u4e3a\u4e00\u65e6\u4fee\u6539\u9519\u8bef\uff0c\u5bf9shell\u6b63\u5e38\u8fd0\u884c\u9020\u6210\u4e25\u91cd\u5f71\u54cd\uff0c\u751a\u81f3\u5bfc\u81f4shell\u65e0\u6cd5\u8fd0\u884c\u3002<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">\u56db\u3001VI\u7f16\u8f91\u5668<\/h6>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u76f8\u4fe1\u6ca1\u6709\u7528\u8fc7Linux\u7684\u540c\u5b66\u5728\u770b\u4e00\u4e9b\u6bb5\u5b50\u7684\u65f6\u5019\u90fd\u4f1a\u770b\u5230\u8fc7\u4e24\u4e2a\u7f16\u8f91\u5668\uff1a<\/p>\n\n\n\n<ul><li>vim<\/li><li>emacs<\/li><\/ul>\n\n\n\n<p>\u4e0b\u9762\u6211\u4eec\u5b66\u4e60\u5982\u4f55\u7b80\u5355\u4f7f\u7528vi\u3002vi \u662f \u201cVisual interface\u201d \u7684\u7b80\u79f0\uff0c\u5b83\u53ef\u4ee5\u6267\u884c\u8f93\u51fa\u3001\u5220\u9664\u3001\u67e5\u627e\u3001\u66ff\u6362\u3001\u5757\u64cd\u4f5c\u7b49\u4f17\u591a\u6587\u672c\u64cd\u4f5c\uff0c\u800c\u4e14<strong>\u7528\u6237\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u9700\u8981\u5bf9\u5176\u8fdb\u884c\u5b9a\u5236\uff0c\u8fd9\u662f\u5176\u4ed6\u7f16\u8f91\u7a0b\u5e8f\u6240\u6ca1\u6709\u7684<\/strong>\u3002<\/p>\n\n\n\n<ul><li>vi\u53ef\u4ee5\u770b\u505a\u6210\u6211\u4eecWindows\u4e0b\u7684\u8bb0\u4e8b\u672c<\/li><li>vim \u5373 Vi IMproved\uff0cvi \u514b\u9686\u7248\u672c\u4e4b\u4e00<\/li><\/ul>\n\n\n\n<p>\u4f7f\u7528Vi\u6765\u7f16\u8f91\u6587\u4ef6\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-76-1024x634.png\" alt=\"\" class=\"wp-image-5423\" width=\"447\" height=\"277\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-76-1024x634.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-76-300x186.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-76-768x475.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-76-830x514.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-76-230x142.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-76-350x217.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-76-480x297.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-76.png 1254w\" sizes=\"(max-width: 447px) 100vw, 447px\" \/><\/figure><\/div>\n\n\n\n<p><strong>Vi\u6709\u4e09\u79cd\u6a21\u5f0f\uff1a<\/strong><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-77-1024x682.png\" alt=\"\" class=\"wp-image-5424\" width=\"423\" height=\"281\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-77-1024x682.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-77-300x200.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-77-768x511.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-77-830x552.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-77-230x153.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-77-350x233.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-77-480x319.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/04\/\u56fe\u7247-77.png 1232w\" sizes=\"(max-width: 423px) 100vw, 423px\" \/><\/figure><\/div>\n\n\n\n<p><strong>4.1 \u666e\u901a\u6a21\u5f0f<\/strong><\/p>\n\n\n\n<ul><li><code>G<\/code>\u7528\u4e8e\u76f4\u63a5\u8df3\u8f6c\u5230\u6587\u4ef6\u5c3e<\/li><li><code>ZZ<\/code>\u7528\u4e8e\u5b58\u76d8\u9000\u51faVi<\/li><li><code>ZQ<\/code>\u7528\u4e8e\u4e0d\u5b58\u76d8\u9000\u51faVi<\/li><li><code>\/\u548c\uff1f<\/code>\u7528\u4e8e\u67e5\u627e\u5b57\u7b26\u4e32<\/li><li><code>n<\/code>\u7ee7\u7eed\u67e5\u627e\u4e0b\u4e00\u4e2a<\/li><li><code>yy<\/code>\u590d\u5236\u4e00\u884c<\/li><li><code>p<\/code>\u7c98\u5e16\u5728\u4e0b\u4e00\u884c\uff0cP\u7c98\u8d34\u5728\u524d\u4e00\u884c<\/li><li><code>dd<\/code>\u5220\u9664\u4e00\u884c\u6587\u672c<\/li><li><code>x<\/code>\u5220\u9664\u5149\u6807\u6240\u5728\u7684\u5b57\u7b26<\/li><li><code>u<\/code>\u53d6\u6d88\u4e0a\u4e00\u6b21\u7f16\u8f91\u64cd\u4f5c\uff08undo\uff09<\/li><\/ul>\n\n\n\n<p><strong>4.2 \u63d2\u5165\u6a21\u5f0f<\/strong><\/p>\n\n\n\n<p>\u5728 Normal \u6a21\u5f0f\u4e0b\u8f93\u5165\u63d2\u5165\u547d\u4ee4 <code>i\u3001 a \u3001 o<\/code>\u8fdb\u5165insert\u6a21\u5f0f\u3002\u7528\u6237\u8f93\u5165\u7684\u4efb\u4f55\u5b57\u7b26\u90fd\u88abvim<strong>\u5f53\u505a\u6587\u4ef6\u5185\u5bb9\u4fdd\u5b58\u8d77\u6765<\/strong>\uff0c\u5e76\u5c06\u5176\u663e\u793a\u5728\u5c4f\u5e55\u4e0a\u3002<\/p>\n\n\n\n<ul><li>\u5728\u6587\u672c\u8f93\u5165\u8fc7\u7a0b\u4e2d\uff0c\u82e5\u60f3\u56de\u5230Normal\u6a21\u5f0f\u4e0b\uff0c\u6309 Esc \u952e\u5373\u53ef\u3002<\/li><\/ul>\n\n\n\n<p><strong>4.3 \u547d\u4ee4\u884c\u6a21\u5f0f<\/strong><\/p>\n\n\n\n<p>Normal \u6a21\u5f0f\u4e0b\uff0c\u7528\u6237\u6309\u5192\u53f7 <code>:<\/code>\u5373\u53ef\u8fdb\u5165 Command \u6a21\u5f0f\uff0c\u6b64\u65f6 vim \u4f1a\u5728\u663e\u793a\u7a97\u53e3\u7684\u6700\u540e\u4e00\u884c (\u5c4f\u5e55\u7684\u6700\u540e\u4e00\u884c) \u663e\u793a\u4e00\u4e2a \u201c:\u201d \u4f5c\u4e3a Command \u6a21\u5f0f\u7684\u63d0\u793a\u7b26\uff0c\u7b49\u5f85\u8f93\u5165\u547d\u4ee4\u3002<\/p>\n\n\n\n<ul><li><code>:w<\/code> &nbsp; \u4fdd\u5b58\u5f53\u524d\u7f16\u8f91\u6587\u4ef6\uff0c\u4f46\u5e76\u4e0d\u9000\u51fa<\/li><li><code>:w<\/code> newfile &nbsp;\u5b58\u4e3a\u53e6\u5916\u4e00\u4e2a\u540d\u4e3a \u201cnewfile\u201d \u7684\u6587\u4ef6<\/li><li><code>:wq<\/code> \u7528\u4e8e\u5b58\u76d8\u9000\u51faVi<\/li><li><code>:q!<\/code> &nbsp; &nbsp;\u7528\u4e8e\u4e0d\u5b58\u76d8\u9000\u51faVi<\/li><li><code>:q<\/code>\u7528\u4e8e\u76f4\u63a5\u9000\u51faVi \uff08\u672a\u505a\u4fee\u6539\uff09<\/li><\/ul>\n\n\n\n<p><strong>\u8bbe\u7f6eVi\u73af\u5883:<\/strong><\/p>\n\n\n\n<ul><li>:set autoindent &nbsp;\u7f29\u8fdb,\u5e38\u7528\u4e8e\u7a0b\u5e8f\u7684\u7f16\u5199<\/li><li>:set noautoindent \u53d6\u6d88\u7f29\u8fdb<\/li><li>:set number \u5728\u7f16\u8f91\u6587\u4ef6\u65f6\u663e\u793a\u884c\u53f7<\/li><li>:set nonumber \u4e0d\u663e\u793a\u884c\u53f7<\/li><li>:set tabstop=value \u8bbe\u7f6e\u663e\u793a\u5236\u8868\u7b26\u7684\u7a7a\u683c\u5b57\u7b26\u4e2a\u6570<\/li><li>:set \u663e\u793a\u8bbe\u7f6e\u7684\u6240\u6709\u9009\u9879<\/li><li>:set all \u663e\u793a\u6240\u6709\u53ef\u4ee5\u8bbe\u7f6e\u7684\u9009\u9879<\/li><\/ul>\n\n\n\n<h6 class=\"wp-block-heading\">\u56db\u3001\u603b\u7ed3<\/h6>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u672c\u6587\u4e3b\u8981\u8bb2\u89e3\u4e86Linux\u7684\u6700\u57fa\u7840\u7684\u77e5\u8bc6\uff0c\u53ef\u4ee5\u7b80\u5355\u5730\u64cd\u4f5cLinux\u4e86\u3002\u547d\u4ee4\u53ef\u4ee5\u8bf4\u662f\u5b66\u4e0d\u5b8c\u7684\uff0c\u53ea\u80fd\u662f\u8bb0\u4f4fLinux\u662f\u6709\u8fd9\u4e2a\u529f\u80fd\uff0c\u5230\u65f6\u5019\u53bb\u7f51\u4e0a\u67e5\u67e5\u4e5f\u5f88\u65b9\u4fbf\u3002<\/p>\n\n\n\n<p>\u4e3b\u8981\u662f\u591a\u7ec3\u3001\u591a\u73a9\u5c31\u53ef\u4ee5\u8bb0\u4f4f\u4e00\u4e9b\u5e38\u7528\u7684Linux\u547d\u4ee4\u4e86~~~~<\/p>\n\n\n\n<p>\u4e0b\u9762\u6211\u5c31\u82b1\u70b9\u65f6\u95f4\u753b\u4e2aLinux\u547d\u4ee4\u7684\u8111\u56fe(\u5f53\u7136\u4e86\uff0c<strong>\u547d\u4ee4\u4ec5\u9650\u4e8e\u662f\u672c\u6587\u7ae0\u7684\u77e5\u8bc6\u70b9<\/strong>\uff0c\u7b49\u5199\u5230\u7528\u6237\u3001\u7f51\u7edc\u7b49\u77e5\u8bc6\u70b9\u7684\u65f6\u5019\u518d\u7ee7\u7eed\u8865\u5145\u4e0a\u53bb\uff01)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8f6c\u8f7d\uff1ahttps:\/\/github.com\/ZhongFuCheng3y\/athena \u524d\u8a00 \u8fd9\u4e2a\u5b66\u671f\u5f00\u4e86Li [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[],"_links":{"self":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/5401"}],"collection":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5401"}],"version-history":[{"count":6,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/5401\/revisions"}],"predecessor-version":[{"id":5425,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/5401\/revisions\/5425"}],"wp:attachment":[{"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5401"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5401"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5401"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}