{"id":272740,"date":"2023-05-19T20:18:28","date_gmt":"2023-05-19T12:18:28","guid":{"rendered":"https:\/\/lrxjmw.cn\/qszwlxtzkxxj.html"},"modified":"2023-05-19T20:18:28","modified_gmt":"2023-05-19T12:18:28","slug":"qszwlxtzkxxj","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/qszwlxtzkxxj.html","title":{"rendered":"\u8f7b\u677e\u638c\u63e1Linux\u7cfb\u7edf\u67e5\u770b\u4fe1\u606f\u6280\u5de7\uff01"},"content":{"rendered":"

\u5728\u4eca\u5929\u8fd9\u4e2a\u9ad8\u5ea6\u4fe1\u606f\u5316\u7684\u65f6\u4ee3linux\u7cfb\u7edf<\/a>\u600e\u4e48\u770b\u7cfb\u7edf<\/strong>\uff0cLinux<\/a>\u7cfb\u7edf\u5df2\u7ecf\u6210\u4e3a\u4e86\u5f88\u591aIT\u4ece\u4e1a\u8005\u7684\u9996\u9009\u64cd\u4f5c\u7cfb\u7edf\u3002\u7136\u800c\uff0c\u5bf9\u4e8e\u4e00\u4e9b\u521d\u5b66\u8005\u6765\u8bf4linux\u4e0b\u8f7d\uff0c\u5728\u4f7f\u7528Linux\u7cfb\u7edf\u65f6\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u95ee\u9898\uff0c\u6bd4\u5982\u5982\u4f55\u67e5\u770b\u7cfb\u7edf\u4fe1\u606f\u3002\u4e0b\u9762\uff0c\u6211\u4eec\u5c06\u4ece9\u4e2a\u65b9\u9762\u9010\u6b65\u5206\u6790Linux\u7cfb\u7edf\u5982\u4f55\u67e5\u770b\u7cfb\u7edf\u4fe1\u606f\u3002<\/p>\n

1.\u67e5\u770b\u5185\u6838\u7248\u672c<\/p>\n

\u5185\u6838\u662f\u64cd\u4f5c\u7cfb\u7edf\u6700\u6838\u5fc3\u7684\u90e8\u5206\u4e4b\u4e00\uff0c\u4e5f\u662f\u6700\u57fa\u7840\u7684\u90e8\u5206\u3002\u56e0\u6b64\uff0c\u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7uname\u547d\u4ee4<\/a>\u6765\u67e5\u770b\u5f53\u524d\u5185\u6838\u7248\u672c\u3002\u5177\u4f53\u547d\u4ee4\u4e3a\uff1a<\/p>\n

\n

\nuname -r\n<\/pre>\n<\/p>\n

2.\u67e5\u770b\u53d1\u884c\u7248\u4fe1\u606f<\/p>\n

\u5728Linux\u4e16\u754c\u4e2d\uff0c\u6709\u8bb8\u591a\u4e0d\u540c\u7684\u53d1\u884c\u7248\uff0c\u6bcf\u4e2a\u53d1\u884c\u7248\u90fd\u6709\u4e0d\u540c\u7684\u7279\u70b9\u548c\u4f18\u7f3a\u70b9\u3002\u5728\u4f7f\u7528Linux\u65f6\uff0c\u6211\u4eec\u9700\u8981\u77e5\u9053\u6211\u4eec\u6240\u4f7f\u7528\u7684\u53d1\u884c\u7248\u662f\u54ea\u4e00\u4e2a\u3002\u5e38\u89c1\u7684\u53d1\u884c\u7248\u6709Debian\u3001Ubuntu\u3001CentOS\u7b49\u7b49\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u6765\u67e5\u770b\u5f53\u524d\u53d1\u884c\u7248\u4fe1\u606f\uff1a<\/p>\n

\n

\ncat \/etc\/issue\n<\/pre>\n<\/p>\n

3.\u67e5\u770bCPU\u548c\u5185\u5b58\u4fe1\u606f<\/p>\n

\u5728\u8fd0\u884c\u5e94\u7528\u7a0b\u5e8f\u65f6\uff0cCPU\u548c\u5185\u5b58\u662f\u975e\u5e38\u91cd\u8981\u7684\u8d44\u6e90\u3002\u6211\u4eec\u9700\u8981\u77e5\u9053\u6211\u4eec\u6240\u4f7f\u7528\u7684\u7cfb\u7edf\u4e2dCPU\u548c\u5185\u5b58\u7684\u4e00\u4e9b\u57fa\u672c\u4fe1\u606f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u6765\u67e5\u770bCPU\u548c\u5185\u5b58\u4fe1\u606f\uff1a<\/p>\n

\n

\nlscpu\nfree -h\n<\/pre>\n<\/p>\n

4.\u67e5\u770b\u786c\u76d8\u4fe1\u606f<\/p>\n

\u786c\u76d8\u662f\u5b58\u50a8\u6570\u636e\u7684\u91cd\u8981\u8bbe\u5907\u4e4b\u4e00\uff0c\u6211\u4eec\u9700\u8981\u77e5\u9053\u6211\u4eec\u6240\u4f7f\u7528\u7684\u7cfb\u7edf\u4e2d\u786c\u76d8\u7684\u4e00\u4e9b\u57fa\u672c\u4fe1\u606f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u6765\u67e5\u770b\u786c\u76d8\u4fe1\u606f\uff1a<\/p>\n

\n

\ndf -h\n<\/pre>\n<\/p>\n

5.\u67e5\u770b\u7f51\u7edc\u63a5\u53e3\u4fe1\u606f<\/p>\n

\u7f51\u7edc\u662f\u73b0\u4ee3\u8ba1\u7b97\u673a\u4e0d\u53ef\u7f3a\u5c11\u7684\u90e8\u5206\u4e4b\u4e00\uff0c\u6211\u4eec\u9700\u8981\u77e5\u9053\u6211\u4eec\u6240\u4f7f\u7528\u7684\u7cfb\u7edf\u4e2d\u7f51\u7edc\u63a5\u53e3\u7684\u4e00\u4e9b\u57fa\u672c\u4fe1\u606f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u6765\u67e5\u770b\u7f51\u7edc\u63a5\u53e3\u4fe1\u606f\uff1a<\/p>\n

linux\u7cfb\u7edf\u600e\u4e48\u770b\u7cfb\u7edf_linux\u7cfb\u7edf\u4e0b\u91cd\u88c5linux_linux \u770b\u786c\u76d8\u7a7a\u95f4<\/p>\n

\n

\nip addr show\n<\/pre>\n<\/p>\n

6.\u67e5\u770b\u8fdb\u7a0b\u4fe1\u606f<\/p>\n

\u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u8fdb\u7a0b\u662f\u975e\u5e38\u91cd\u8981\u7684\u6982\u5ff5\u4e4b\u4e00\uff0c\u5b83\u4eec\u51b3\u5b9a\u4e86\u7cfb\u7edf\u8fd0\u884c\u7684\u72b6\u6001\u3002\u6211\u4eec\u9700\u8981\u77e5\u9053\u5f53\u524d\u7cfb\u7edf\u4e2d\u6b63\u5728\u8fd0\u884c\u54ea\u4e9b\u8fdb\u7a0b\uff0c\u4ee5\u53ca\u5b83\u4eec\u6240\u5360\u7528\u7684\u8d44\u6e90\u60c5\u51b5\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u6765\u67e5\u770b\u8fdb\u7a0b\u4fe1\u606f\uff1a<\/p>\n

\n

\nps aux\ntop\n<\/pre>\n<\/p>\n

7.\u67e5\u770b\u65e5\u5fd7\u4fe1\u606f<\/p>\n

\u65e5\u5fd7\u662fLinux\u7cfb\u7edf\u4e2d\u975e\u5e38\u91cd\u8981\u7684\u90e8\u5206\u4e4b\u4e00\uff0c\u5b83\u8bb0\u5f55\u4e86\u7cfb\u7edf\u8fd0\u884c\u8fc7\u7a0b\u4e2d\u53d1\u751f\u7684\u4e8b\u4ef6\u548c\u9519\u8bef\u3002\u6211\u4eec\u9700\u8981\u77e5\u9053\u5982\u4f55\u67e5\u770b\u65e5\u5fd7\u4fe1\u606f\uff0c\u4ee5\u4fbf\u4e8e\u5feb\u901f\u53d1\u73b0\u548c\u89e3\u51b3\u95ee\u9898\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u6765\u67e5\u770b\u65e5\u5fd7\u4fe1\u606f\uff1a<\/p>\n

\n

\ntail -f\/var\/log\/messages\ndmesg\n<\/pre>\n<\/p>\n

8.\u67e5\u770b\u7528\u6237\u548c\u7ec4\u4fe1\u606f<\/p>\n

\u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u7528\u6237\u548c\u7ec4\u662f\u975e\u5e38\u91cd\u8981\u7684\u6982\u5ff5\u4e4b\u4e00\uff0c\u5b83\u4eec\u63a7\u5236\u7740\u7cfb\u7edf\u4e2d\u4e0d\u540c\u7528\u6237\u5bf9\u4e0d\u540c\u8d44\u6e90\u7684\u8bbf\u95ee\u6743\u9650\u3002\u56e0\u6b64\uff0c\u6211\u4eec\u9700\u8981\u77e5\u9053\u5f53\u524d\u7cfb\u7edf\u4e2d\u6709\u54ea\u4e9b\u7528\u6237\u548c\u7ec4linux\u7cfb\u7edf\u600e\u4e48\u770b\u7cfb\u7edf<\/strong>\uff0c\u5e76\u4e14\u5b83\u4eec\u7684\u6743\u9650\u662f\u4ec0\u4e48\u6837\u5b50\u7684\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u6765\u67e5\u770b\u7528\u6237\u548c\u7ec4\u4fe1\u606f\uff1a<\/p>\n

\n

\ncat \/etc\/passwd\ncat \/etc\/group\n<\/pre>\n<\/p>\n

9.\u67e5\u770b\u7cfb\u7edf\u8d1f\u8f7d\u4fe1\u606f<\/p>\n

\u7cfb\u7edf\u8d1f\u8f7d\u662f\u6307\u6b63\u5728\u8fd0\u884c\u7684\u8fdb\u7a0b\u6570\u548c\u7b49\u5f85\u8fd0\u884c\u7684\u8fdb\u7a0b\u6570\u3002\u5b83\u53cd\u6620\u4e86\u5f53\u524d\u7cfb\u7edf\u7684\u5de5\u4f5c\u8d1f\u8377\u3002\u6211\u4eec\u9700\u8981\u77e5\u9053\u5f53\u524d\u7cfb\u7edf\u7684\u8d1f\u8f7d\u60c5\u51b5\uff0c\u4ee5\u4fbf\u4e8e\u5224\u65ad\u5f53\u524d\u7cfb\u7edf\u662f\u5426\u5904\u4e8e\u7e41\u5fd9\u72b6\u6001\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u6765\u67e5\u770b\u7cfb\u7edf\u8d1f\u8f7d\u4fe1\u606f\uff1a<\/p>\n

\n

\nuptime\n<\/pre>\n<\/p>\n

\u901a\u8fc7\u4ee5\u4e0a9\u4e2a\u65b9\u9762\u7684\u5206\u6790\uff0c\u6211\u4eec\u53ef\u4ee5\u77e5\u9053\u5982\u4f55\u5728Linux\u7cfb\u7edf\u4e2d\u67e5\u770b\u5404\u79cd\u7cfb\u7edf\u4fe1\u606f\u3002\u5bf9\u4e8e\u521d\u5b66\u8005\u6765\u8bf4\uff0c\u8fd9\u4e9b\u4fe1\u606f\u53ef\u80fd\u6709\u4e9b\u62bd\u8c61\u548c\u590d\u6742\uff0c\u4f46\u53ea\u8981\u7ecf\u8fc7\u4e00\u5b9a\u7684\u5b66\u4e60\u548c\u5b9e\u8df5linux\u5f00\u6e90\u8f6f\u4ef6\uff0c\u5c31\u53ef\u4ee5\u638c\u63e1\u8fd9\u4e9b\u6280\u80fd\uff0c\u5e76\u4e14\u5728\u5b9e\u9645\u5de5\u4f5c\u4e2d\u5f97\u5fc3\u5e94\u624b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u4e0b\u9762\uff0c\u6211\u4eec\u5c06\u4ece9\u4e2a\u65b9\u9762\u9010\u6b65\u5206\u6790Linux\u7cfb\u7edf\u5982\u4f55\u67e5\u770b\u7cfb\u7edf\u4fe1\u606f\u3002\u6211\u4eec\u9700\u8981\u77e5\u9053\u6211\u4eec\u6240\u4f7f\u7528\u7684\u7cfb\u7edf\u4e2dCPU\u548c\u5185\u5b58\u7684\u4e00\u4e9b\u57fa\u672c\u4fe1\u606f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u6765\u67e5\u770bCPU\u548c\u5185\u5b58\u4fe1\u606f\uff1a\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u6765\u67e5\u770b\u786c\u76d8\u4fe1\u606f\uff1a\u6211\u4eec\u9700\u8981\u77e5\u9053\u5982\u4f55\u67e5\u770b\u65e5\u5fd7\u4fe1\u606f\uff0c\u4ee5\u4fbf\u4e8e\u5feb\u901f\u53d1\u73b0\u548c\u89e3\u51b3\u95ee\u9898\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u6765\u67e5\u770b\u7cfb\u7edf\u8d1f\u8f7d\u4fe1\u606f\uff1a\u901a\u8fc7\u4ee5\u4e0a9\u4e2a\u65b9\u9762\u7684\u5206\u6790\uff0c\u6211\u4eec\u53ef\u4ee5\u77e5\u9053\u5982\u4f55\u5728Linux\u7cfb\u7edf\u4e2d\u67e5\u770b\u5404\u79cd\u7cfb\u7edf\u4fe1\u606f\u3002<\/p>\n","protected":false},"author":1,"featured_media":272741,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-272740","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/272740","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=272740"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/272740\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/272741"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=272740"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=272740"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=272740"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}