{"id":276110,"date":"2023-06-27T20:07:26","date_gmt":"2023-06-27T12:07:26","guid":{"rendered":"https:\/\/lrxjmw.cn\/sndlmlgjhjqf.html"},"modified":"2023-06-27T20:07:26","modified_gmt":"2023-06-27T12:07:26","slug":"sndlmlgjhjqf","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/sndlmlgjhjqf.html","title":{"rendered":"\u5341\u5e74\u7684Linux\u547d\u4ee4\u3001\u5de5\u5177\u548c\u6280\u5de7\u5206\u4eab\uff0c\u503c\u5f97\u6536\u85cf\uff01"},"content":{"rendered":"
\u660e\u5929\u7ed9\u4f60\u4eec\u5206\u4eab\u7528\u4e86\u516d\u5e74\u7684Linux<\/a>\u603b\u7ed3\u4e0b\u6765\u768411\u4e2a\u70ab\u76ee\u7684Linux\u7ec8\u7aef\u547d\u4ee4<\/a>\u5927\u5168\uff0c\u901a\u8fc7\u660e\u5929\u8fd9\u7bc7\u6587\u7ae0\u6211\u5c06\u5411\u4f60\u4eec\u5c55\u793a\u4e00\u7cfb\u5217\u7684Linux\u547d\u4ee4\u3001\u5de5\u5177\u548c\u65b9\u6cd5\uff0c\u5e0c\u671b\u8fd8\u80fd\u5e2e\u52a9\u5230\u4f60\u4eec\u3002<\/p>\n 1.\u547d\u4ee4\u884c\u65e5\u5e38\u5feb\u6377\u952e<\/p>\n \u5982\u4e0b\u7684\u5feb\u6377\u65b9\u6cd5\u5341\u5206\u6709\u7528\uff0c\u8fd8\u80fd\u6781\u5927\u7684\u63d0\u9ad8\u4f60\u7684\u5de5\u4f5c\u6548\u7387\uff1a<\/p>\n CTRL+U\u526a\u5207\u5149\u6807\u524d\u7684\u5185\u5bb9<\/p>\n CTRL+K\u526a\u5207\u5149\u6807\u81f3\u884c\u672b\u7684\u5185\u5bb9<\/p>\n CTRL+Y\u7c98\u8d34<\/p>\n CTRL+E\u8054\u901a\u5149\u6807\u5230\u884c\u672b<\/p>\n CTRL+A\u8054\u901a\u5149\u6807\u5230\u884c\u9996<\/p>\n ALT+F\u8df3\u5411\u4e0a\u4e00\u4e2a\u7a7a\u683c<\/p>\n ALT+B\u632a\u5230\u4e0a\u4e00\u4e2a\u7a7a\u683c<\/p>\n ALT+Backspace\u5220\u6389\u524d\u4e00\u4e2a\u8bcd\u7ec4<\/p>\n CTRL+W\u526a\u5207\u5149\u6807\u540e\u4e00\u4e2a\u8bcd\u7ec4<\/p>\n Shift+Insert\u5411\u7ec8\u7aef\u5185\u7c98\u8d34\u6587\u672c<\/p>\n \u8fd9\u4e48\u4e3a\u4e86\u8ba9\u4e0a\u8ff0\u5185\u5bb9\u66f4\u6613\u7406\u89e3\u6765\u770b\u4e0b\u8fb9\u7684\u8fd9\u884c\u547d\u4ee4\u3002<\/p>\n sudoapt-getintallprogramname<\/p>\n \u5982\u4f60\u6240\u89c1\uff0c\u547d\u4ee4\u4e2d\u5b58\u5728\u62fc\u5199\u9519\u8bef\uff0c\u4e3a\u4e86\u6b63\u5e38\u6267\u884c\u987b\u8981\u628a\u201cintall\u201d\u66ff\u6362\u6210\u201cinstall\u201d\u3002<\/p>\n \u60f3\u50cf\u73b0\u4eca\u5149\u6807\u6b63\u5728\u884c\u672blinux\u57f9\u8bad\u5b66\u6821\uff0c\u6211\u4eec\u6709\u597d\u591a\u7684\u65b9\u5f0f\u5c06\u5979\u9000\u56de\u8bcd\u7ec4install\u5e76\u66ff\u6362\u5b83\u3002<\/p>\n \u6211\u53ef\u4ee5\u6309\u4e24\u6b21ALT+B\u8fd9\u6837\u5149\u6807\u90fd\u4f1a\u5728\u5982\u4e0b\u7684\u4f4d\u7f6e(\u8fd9\u513f\u7528\u6307\u4ee3\u5149\u6807\u7684\u4f4d\u7f6e)\u3002<\/p>\n sudoapt-getinstallprogramname<\/p>\n \u5982\u4eca\u4f60\u53ef\u4ee5\u6309\u4e24\u4e0b\u65b9\u5411\u952e\u5e76\u5c06\u201cs\u201d\u63d2\u5165\u5230install\u4e2d\u53bb\u4e86\u3002<\/p>\n \u5047\u5982\u4f60\u60f3\u5c06\u6d4f\u89c8\u5668\u4e2d\u7684\u6587\u672c\u590d\u5236\u5230\u7ec8\u7aef\uff0c\u53ef\u4ee5\u4f7f\u7528\u5feb\u6377\u952e\"shift+insert\"\u3002<\/p>\n 2.SUDO!!<\/p>\n sudo\u8fd9\u4e2a\u547d\u4ee4\u6743\u9650\u6307\u6d3e\uff0c\u5728\u81ea\u5df1\u5e73\u5e38\u7ec3\u4e60\u7684\u73af\u5883\u53ef\u80fd\u78b0\u5230\u7684\u5c11\uff0c\u800c\u4e14\u5728\u4f01\u4e1a\u73af\u5883\u4e2d\u5e38\u5e38\u78b0\u5230\u8fd9\u4e2a\u547d\u4ee4\u3002\u7531\u4e8e\u5047\u5982\u4f60\u4e0d\u6653\u5f97\u7684\u8bdd\uff0c\u90a3\u6bcf\u6b21\u4f60\u5728\u8f93\u5165\u957f\u4e32\u547d\u4ee4\u540e\u542c\u5230\u201cpermissiondenied\u201d\u540e\u4e00\u5b9a\u4f1a\u82e6\u95f7\u4e0d\u582a\u3002\u600e\u6837\u4f7f\u7528sudo!!?\u5f88\u7b80\u5355\u3002\u8bd5\u60f3\u4f60\u521a\u8f93\u5165\u4e86\u5982\u4e0b\u547d\u4ee4\uff1a<\/p>\n apt-getinstallranger<\/p>\n \u4e00\u5b9a\u4f1a\u51fa\u73b0\u201cPermissiondenied\u201d\uff0c\u9664\u975e\u4f60\u65e9\u5df2\u767b\u9646\u4e86\u8db3\u591f\u9ad8\u6743\u9650\u7684\u5e10\u6237\u3002<\/p>\n sudo!!\u90fd\u4f1a\u7528sudo\u7684\u65b9\u5f0f\u8fd0\u884c\u4e0a\u4e00\u6761\u547d\u4ee4\u3002\u6240\u4ee5\u4e0a\u4e00\u6761\u547d\u4ee4\u5c31\u5f04\u6210\u4e86\u8fd9\u6837\uff1a<\/p>\n sudoapt-getinstallranger<\/p>\n 3.\u6682\u505c\u5e76\u5728\u540e\u53f0\u8fd0\u884c\u547d\u4ee4<\/p>\n CTRL+Z\\\u6682\u505c\u5e94\u7528\u7a0b\u5e8f<\/p>\n fg\\\u91cd\u65b0\u5c06\u7a0b\u5e8f\u5524\u5230\u524d\u53f0<\/p>\n \u4f7f\u7528\u5b9e\u4f8b\uff1a<\/p>\n \u5047\u5b9a\u4f60\u5728\u4f7f\u7528\"sudonanoabc.txt\"\u7f16\u8f91\u5230\u4e00\u534a\u65f6\u4f60\u610f\u8bc6\u5230\u4f60\u987b\u8981\u9a6c\u4e0a\u5728\u7ec8\u7aef\u8f93\u5165\u4e9b\u547d\u4ee4\uff0c\u800c\u4e14nano\u5728\u524d\u53f0\u8fd0\u884c\u8ba9\u4f60\u4e0d\u80fd\u8f93\u5165\u3002\u4f60\u53ef\u80fd\u8ba4\u4e3a\u60df\u4e00\u7684\u65b9\u5f0f\u5c31\u662f\u4fdd\u5b58\u6587\u4ef6\uff0c\u9000\u51fanano\uff0c\u8fd0\u884c\u547d\u4ee4\u4e4b\u540e\u5728\u91cd\u65b0\u6253\u5f00nano\u3002<\/p>\n \u867d\u7136\u4f60\u53ea\u8981\u6309CTRL+Z\uff0c\u524d\u53f0\u7684\u547d\u4ee4\u624d\u4f1a\u6682\u505c\uff0c\u753b\u9762\u5c31\u5207\u56de\u5230\u547d\u4ee4\u884c\u4e86\u3002\u4e4b\u540e\u4f60\u80fd\u591f\u8fd0\u884c\u4f60\u60f3\u8981\u8fd0\u884c\u547d\u4ee4\uff0c\u7b49\u547d\u4ee4\u8fd0\u884c\u5b8c\u540e\u5728\u7ec8\u7aef\u7a97\u53e3\u8f93\u5165\u201cfg\u201d\u5c31\u53ef\u4ee5\u56de\u5230\u4ee5\u524d\u6682\u505c\u7684\u4efb\u52a1\u3002<\/p>\n 4.\u4f7f\u7528nohup\u5728\u767b\u8f7dSSH\u4f1a\u8bdd\u540e\u4ecd\u8fd0\u884c\u547d\u4ee4<\/p>\n \u5047\u5982\u4f60\u7528ssh\u767b\u9646\u522b\u7684\u673a\u5668\u65f6\uff0cnohup\u547d\u4ee4\u771f\u7684\u5341\u5206\u6709\u7528\u3002\u8fd9\u4e48\u5982\u4f55\u4f7f\u7528nohup\u5462?<\/p>\n \u4e3e\u4e2a\u53cd\u4f8b\uff0c\u7531\u4e8e\u6d4b\u8bd5\u7684\u987b\u8981\uff0c\u6211\u7528\u8986\u76c6\u5b50\u6d3e\u6765\u4e0b\u8f7d\u53d1\u884c\u7248\u3002\u901a\u5e38\u6211\u603b\u662f\u7528SSH\u4ece\u7535\u8111\u7b14\u8bb0\u672c\u8054\u63a5\u5230\u7315\u7334\u6843\u6d3e\u3002\u5047\u5982\u6211\u5728\u4e0d\u7528nohup\u7684\u60c5\u51b5\u4e0b\u4f7f\u7528\u7315\u7334\u6843\u6d3e\u4e0b\u8f7d\u5c0f\u578b\u6587\u4ef6\uff0c\u90a3\u6211\u5c31\u5fc5\u987b\u7b49\u5f85\u5230\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u624d\u4f1a\u767b\u8f7dssh\u4f1a\u8bdd\u5173\u95ed\u7535\u8111\u3002\u53ef\u5047\u5982\u662f\u8fd9\u6837\uff0c\u90a3\u6211\u4e3a\u4f55\u8981\u4f7f\u7528\u7315\u7334\u6843\u6d3e\u4e0b\u6587\u4ef6\u5462?<\/p>\n \u4f7f\u7528nohup\u7684\u65b9\u5f0f\u4e5f\u5f88\u7b80\u5355\uff0c\u53ea\u9700\u5982\u4e0b\u4f8b\u4e2d\u5728nohup\u540e\u8f93\u5165\u8981\u6267\u884c\u7684\u547d\u4ee4\u5373\u53ef\uff1a<\/p>\n nohupwget&<\/p>\n 5.\u5728\u7279\u5b9a\u7684\u65f6\u95f4\u8fd0\u884cLinux\u547d\u4ee4<\/p>\n <\/p>\n \u2018nohup\u2019\u547d\u4ee4\u5728\u4f60\u7528SSH\u8054\u63a5\u5230\u670d\u52a1\u5668\uff0c\u5e76\u5728\u91cc\u9762\u4fdd\u6301\u6267\u884cSSH\u767b\u8f7d\u524d\u4efb\u52a1\u7684\u65f6\u4faf\u975e\u5e38\u6709\u7528\u3002<\/p>\n \u60f3\u4e00\u4e0b\u5047\u5982\u4f60\u987b\u8981\u5728\u7279\u5b9a\u7684\u65f6\u95f4\u6267\u884c\u76f8\u540c\u7684\u547d\u4ee4\uff0c\u8fd9\u4e9b\u60c5\u51b5\u8be5\u5982\u4f55\u529e\u5462?<\/p>\n \u547d\u4ee4\u2018at\u2019\u5c31\u80fd\u59a5\u5584\u89e3\u51b3\u8fd9\u4e00\u60c5\u51b5\u3002\u4ee5\u4e0b\u662f\u2018at\u2019\u4f7f\u7528\u793a\u4f8b\u3002<\/p>\n #at10:38PMFriat<\/p>\n at>cowsay'hello'<\/p>\n at>CTRL+D<\/p>\n \u91cc\u9762\u7684\u547d\u4ee4\u80fd\u5728\u5468\u516d\u665a\u4e0a10\u65f638\u5206\u8fd0\u884c\u7a0b\u5e8fcowsay\u3002<\/p>\n \u4f7f\u7528\u7684\u53e5\u578b\u5c31\u662f\u2018at\u2019\u540e\u8ffd\u52a0\u65e5\u671f\u65f6\u95f4\u3002\u5f53at>\u63d0\u793a\u7b26\u51fa\u73b0\u540e\u5c31\u53ef\u4ee5\u8f93\u5165\u4f60\u60f3\u5728\u54ea\u4e2a\u65f6\u95f4\u8fd0\u884c\u7684\u547d\u4ee4\u4e86\u3002CTRL+D\u8fd4\u56de\u7ec8\u7aef\u3002<\/p>\n \u8fd8\u6709\u8bb8\u591a\u65e5\u671f\u548c\u65f6\u95f4\u7684\u683c\u5f0f\uff0c\u90fd\u987b\u8981\u4f60\u597d\u597d\u7ffb\u4e00\u7ffb\u2018at\u2019\u7684man\u6307\u5357\u6765\u627e\u5230\u66f4\u591a\u7684\u4f7f\u7528\u65b9\u6cd5\u3002<\/p>\n 6.Man\u6307\u5357<\/p>\n Man\u6307\u5357\u4f1a\u4e3a\u4f60\u5217\u4e3e\u547d\u4ee4\u548c\u53c2\u6570\u7684\u4f7f\u7528\u5927\u7eb2\uff0c\u6559\u4f60\u600e\u4e48\u4f7f\u7528\u4ed6\u4eec\u3002Man\u6307\u5357\u770b\u4e0a\u53bb\u67af\u71e5\u4e4f\u5473\u3002\u4e0d\u8fc7\u8fd9\u4e0d\u4ee3\u8868\u4f60\u4e0d\u80fd\u505a\u4e9b\u54ea\u4e9b\u6765\u4f7f\u4ed6\u4eec\u663e\u5f97\u6f02\u4eae\u4e9b:<\/p>\n exportPAGER=most\u4f60\u987b\u8981\u5b89\u88c5\u2018most\u2019;\u5979\u4f1a\u4f7f\u4f60\u7684\u4f60\u7684man\u6307\u5357\u7684\u8272\u8c03\u6108\u53d1\u8273\u4e3d\u3002<\/p>\n \u4f60\u53ef\u4ee5\u7528\u4ee5\u4e0b\u547d\u4ee4\u7ed9man\u6307\u5357\u8bbe\u5b9a\u6307\u5b9a\u7684\u5c40\u957f\uff1a<\/p>\n exportMANWIDTH=80\u6700\u540e\uff0c\u5047\u5982\u4f60\u6709\u4e00\u4e2a\u53ef\u7528\u7684\u6d4f\u89c8\u5668\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528-H\u5728\u9ed8\u8ba4\u6d4f\u89c8\u5668\u4e2d\u6253\u5f00\u4efb\u610f\u7684man\u9875\u3002<\/p>\n man-H\u6ce8\u610f\u5566\uff0c\u4ee5\u4e0a\u7684\u547d\u4ee4\u53ea\u6709\u5728\u4f60\u5c06\u9ed8\u8ba4\u7684\u6d4f\u89c8\u5668\u8bbe\u7f6e\u5230\u73af\u5883\u53d8\u91cf$BROWSER\u4e2d\u4e86\u4ee5\u540e\u624d\u7597\u6548\u54df\u3002<\/p>\n 7.\u4f7f\u7528htop\u67e5\u770b\u548c\u7ba1\u7406\u8fdb\u7a0b<\/p>\n \u4f60\u7528\u90a3\u4e2a\u547d\u4ee4\u627e\u51fa\u7b14\u8bb0\u672c\u4e0a\u6b63\u5728\u8fd0\u884c\u7684\u8fdb\u7a0b\u7684\u5462?\u6211\u6562\u6253\u8d4c\u662f\u2018ps\u2019\u5e76\u5728\u5176\u540e\u52a0\u4e0d\u540c\u7684\u53c2\u6570\u6765\u5f97\u5230\u4f60\u6240\u60f3\u8981\u7684\u4e0d\u540c\u8f93\u51fa\u3002<\/p>\n \u5b89\u88c5\u2018htop\u2019\u5427!\u7edd\u5bf9\u8ba9\u4f60\u76f8\u89c1\u6068\u665a\u3002<\/p>\n htop\u5728\u7ec8\u7aef\u4e0a\u5c06\u8fdb\u7a0b\u4ee5\u5217\u8868\u7684\u5f62\u5f0f\u5448\u73b0\uff0c\u6709\u70b9\u7c7b\u4f3c\u4e8eWindows\u4e2d\u7684\u4efb\u52a1\u7ba1\u7406\u5668\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528\u529f\u80fd\u952e\u7684\u7ec4\u5408\u6765\u5207\u6362\u6392\u5217\u7684\u65b9\u6cd5\u548c\u5c55\u793a\u4e0b\u6765\u7684\u9879\u3002\u4f60\u4e5f\u53ef\u4ee5\u5728htop\u4e2d\u76f4\u63a5\u6740\u5bb3\u8fdb\u7a0b\u3002<\/p>\n \u5728\u7ec8\u7aef\u4e2d\u7b80\u5355\u7684\u8f93\u5165htop\u5373\u53ef\u8fd0\u884c\u3002<\/p>\n