{"id":271650,"date":"2023-05-07T04:02:02","date_gmt":"2023-05-06T20:02:02","guid":{"rendered":"https:\/\/gulass.cn\/jclnhbbdczxt.html"},"modified":"2023-05-07T04:02:02","modified_gmt":"2023-05-06T20:02:02","slug":"jclnhbbdczxt","status":"publish","type":"post","link":"https:\/\/gulass.cn\/jclnhbbdczxt.html","title":{"rendered":"\u68c0\u67e5Linux\u5185\u6838\u7248\u672c\u7684\u64cd\u4f5c\u7cfb\u7edf\u540d\u79f0\u548c\u7248\u672c\u547d\u4ee4"},"content":{"rendered":"

\u68c0\u6d4bLinux<\/a>\u4e2d\u7684\u64cd\u4f5c\u7cfb\u7edf<\/a>\u7248\u672c<\/p>\n

\u5728Linux\u4e0a\u67e5\u627e\u64cd\u4f5c\u7cfb\u7edf<\/a>\u540d\u79f0\u548c\u7248\u672c\u7684\u8fc7\u7a0b\uff1a<\/p>\n

\u6253\u5f00\u7ec8\u7aef\u5e94\u7528\u7a0b\u5e8f(bashshell)<\/p>\n

\u5bf9\u4e8e\u4f7f\u7528ssh\u7684\u8fdc\u7a0b\u670d\u52a1\u5668\u767b\u9646\uff1asshuser@server-name<\/p>\n

\u952e\u5165\u4ee5\u4e0b\u4efb\u4e00\u547d\u4ee4<\/a>\u4ee5\u5728Linux\u4e2d\u67e5\u627e\u64cd\u4f5c\u7cfb\u7edf\u540d\u79f0\u548c\u7248\u672c\uff1a<\/p>\n

\n

\ncat \/etc\/os-release\nlsb_release -a\nhostnamectl<\/code><\/pre>\n<\/p>\n

\u952e\u5165\u4ee5\u4e0b\u547d\u4ee4\u4ee5\u67e5\u627eLinux\u5185\u6838\u7248\u672c\uff1a<\/p>\n

\n

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

\u8ba9\u6211\u4eec\u8be6\u5c3d\u4e86\u89e3\u5e38\u89c1Linux\u53d1\u884c\u7248\u7684\u6240\u6709\u793a\u4f8b\u3002<\/p>\n

\/etc\/os-release\u6587\u4ef6<\/p>\n

\u952e\u5165\u4ee5\u4e0bcat\u547d\u4ee4\u4ee5\u67e5\u770b\/etc\/os-release\u6587\u4ef6\uff1a<\/p>\n

\n

\ncat \/etc\/os-release<\/code><\/pre>\n<\/p>\n

\u793a\u4f8b\u8f93\u51fa\uff1a<\/p>\n

\n

\n\u540d\u79f0=\"Ubuntu\"\nVERSION=\"20.04.1 LTS (Focal Fossa)\"\nID=Ubuntu\nID_LIKE=debian\nPRETTY_NAME=\"Ubuntu 20.04.1 LTS\"\nVERSION_ID=\"20.04\"\nHOME_URL=\"https:\/\/www.ubuntu.com\/\"\nSUPPORT_URL=\"https:\/\/help.ubuntu.com\/\"\nBUG_REPORT_URL=\"https:\/\/bugs.launchpad.net\/ubuntu\/\"\nPRIVACY_POLICY_URL=\"https:\/\/www.ubuntu.com\/legal\/terms-and-policies\/privacy-policy\"\nVERSION_CODENAME=\u7126\u70b9\nUBUNTU_CODENAME=\u7126\u70b9<\/code><\/pre>\n<\/p>\n

\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528grep\u547d\u4ee4\/egrep\u547d\u4ee4\u8fc7\u6ee4\u6389OS\u7248\u672c\u548c\u540d\u79f0\u7b49\u4fe1\u606f\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n

\n

\ngrep '^VERSION' \/etc\/os-release\negrep '^(VERSION|NAME)=' \/etc\/os-release<\/code><\/pre>\n<\/p>\n

\n

\nNAME=\"CentOS Linux\"\n\u7248\u672c=\u201c8\uff08\u6838\u5fc3\uff09\u201d<\/code><\/pre>\n<\/p>\n

\u867d\u7136\u662f\u50cfAlpineLinux\u8fd9\u6837\u7684\u5927\u578bLinux\u53d1\u884c\u7248\u4e5f\u63d0\u4f9b\u4e86\u6240\u9700\u7684OS(\u64cd\u4f5c\u7cfb\u7edf)\u4fe1\u606f\uff0c\u5305\u62ec\u7248\u672c\uff1a<\/p>\n

\n

\nNAME=\"\u9ad8\u5c71 Linux\"\nID=\u9ad8\u5c71\nVERSION_ID=3.12.1\nPRETTY_NAME=\"Alpine Linux v3.12\"\nHOME_URL=\"https:\/\/alpinelinux.org\/\"\nBUG_REPORT_URL=\"https:\/\/bugs.alpinelinux.org\/\"<\/code><\/pre>\n<\/p>\n

\u4f7f\u7528lsb_release\u547d\u4ee4\u68c0\u6d4bLinux\u4e0a\u7684\u64cd\u4f5c\u7cfb\u7edf\u7248\u672c<\/p>\n

lsb_release\u547d\u4ee4\u5728CLI\u4e0a\u63d0\u4f9bLSB(Linux\u6807\u51c6\u5e93)\u548c\u7279\u5b9a\u4e8e\u53d1\u884c\u7248\u7684\u4fe1\u606f\u3002\u53e5\u578b\u662f\uff1a<\/p>\n

\n

\nlsb_release -a<\/code><\/pre>\n<\/p>\n

linux\u67e5\u770b\u7248\u672c5\u8fd8\u662f6_linux\u4e0b\u67e5\u770b\u64cd\u4f5c\u7cfb\u7edf\u7248\u672c_\u67e5\u770b linux \u64cd\u4f5c\u7cfb\u7edf\u7248\u672c<\/p>\n

\u793a\u4f8b\u8f93\u51fa\uff1a<\/p>\n

\n

\nLSB \u7248\u672c\uff1a:core-4.1-amd64:core-4.1-noarch\n\u53d1\u884c\u5546\u7f16\u53f7\uff1aCentOS\n\u8bf4\u660e\uff1aCentOS Linux release 7.4.1708 (Core)\n\u53d1\u5e03\uff1a7.4.1708\n\u4ee3\u53f7\uff1a\u6838\u5fc3<\/code><\/pre>\n<\/p>\n

hostnamectl\u547d\u4ee4<\/p>\n

\u4f7f\u7528hostnamectl\u547d\u4ee4\u67e5\u8be2\u548c\u4fee\u6539\u7cfb\u7edf\u4e3b\u673a\u540d\u53ca\u76f8\u5173\u8bbe\u7f6e\u3002\u53ea\u9700\u952e\u5165\u4ee5\u4e0b\u547d\u4ee4\u5373\u53ef\u68c0\u6d4b\u64cd\u4f5c\u7cfb\u7edf\u540d\u79f0\u548cLinux\u5185\u6838\u7248\u672c\u3002\u8bf8\u5982\uff1a<\/p>\n

\n

\nhostnamectl<\/code><\/pre>\n<\/p>\n

\u5b83\u4f1a\u7ed9\u51fa\u5982\u4e0b\u4fe1\u606f\u3002\u6ce8\u610f\u201c\u64cd\u4f5c\u7cfb\u7edf\u201d\u548c\u201c\u5185\u6838\u201d\uff1a<\/p>\n

\n

\n   \u9759\u6001\u4e3b\u673a\u540d\uff1anixcraft-www-42\n         \u56fe\u6807\u540d\u79f0\uff1a\u8ba1\u7b97\u673a-vm\n           \u673a\u7bb1\uff1avm\n        \u673a\u5668\u7f16\u53f7\uff1abeb217fbb4324b7d9959f78c279e6599\n           \u5f15\u5bfc ID\uff1a10f00cc5ca614b518a84d1793d0134bc\n    \u865a\u62df\u5316\uff1aqemu\n  \u64cd\u4f5c\u7cfb\u7edf\uff1aUbuntu 16.04.3 LTS\n            \u5185\u6838\uff1aLinux 4.10.0-42-generic\n      \u67b6\u6784\uff1ax86-64<\/code><\/pre>\n<\/p>\n

\u67e5\u770b linux \u64cd\u4f5c\u7cfb\u7edf\u7248\u672c_linux\u4e0b\u67e5\u770b\u64cd\u4f5c\u7cfb\u7edf\u7248\u672c_linux\u67e5\u770b\u7248\u672c5\u8fd8\u662f6<\/p>\n

OpenSUSELinux15.2\u670d\u52a1\u5668\u7684\u53e6\u4e00\u4e2a\u8f93\u51fa\uff1a<\/p>\n

\n

\n   \u9759\u6001\u4e3b\u673a\u540d\uff1aopensuse-nixcraft\n         \u56fe\u6807\u540d\u79f0\uff1a\u8ba1\u7b97\u673a-vm\n           \u673a\u7bb1\uff1avm\n        \u673a\u5668\u7f16\u53f7\uff1ab95459dbd45d428fa513ab6a9636d1a8\n           \u5f15\u5bfc ID\uff1a9a144556789241e29b62b962cfb6ba1d\n    \u865a\u62df\u5316\uff1akvm\n  \u64cd\u4f5c\u7cfb\u7edf\uff1aopenSUSE Leap 15.2\n       CPE \u64cd\u4f5c\u7cfb\u7edf\u540d\u79f0\uff1acpe:\/o:opensuse:leap:15.2\n            \u5185\u6838\uff1aLinux 5.3.18-lp152.50-default\n      \u67b6\u6784\uff1ax86-64<\/code><\/pre>\n<\/p>\n

unname\u547d\u4ee4<\/p>\n

\u53ea\u9700\u590d\u5370Linux\u5185\u6838\u7248\u672c\uff0c\u8fd0\u884c\u4ee5\u4e0buname\u547d\u4ee4\uff1a<\/p>\n

\n

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

\u793a\u4f8b\u8f93\u51fa\uff1a<\/p>\n

linux\u67e5\u770b\u7248\u672c5\u8fd8\u662f6_\u67e5\u770b linux \u64cd\u4f5c\u7cfb\u7edf\u7248\u672c_linux\u4e0b\u67e5\u770b\u64cd\u4f5c\u7cfb\u7edf\u7248\u672c<\/p>\n

\u53e6\u4e00\u79cd\u9009\u62e9\u662f\u952e\u5165\u4ee5\u4e0bcat\/moreorless\uff1a<\/p>\n

\n

\ncat \/proc\/version<\/code><\/pre>\n<\/p>\n

\u793a\u4f8b\u8f93\u51fa\uff1a<\/p>\n

\n

\nLinux \u7248\u672c 3.10.0-693.11.6.el7.x86_64 (mockbuild@x86-041.build.eng.bos.redhat.com) (gcc \u7248\u672c 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC) ) #1 SMP 2017 \u5e74 12 \u6708 28 \u65e5\u661f\u671f\u56db 14:23:39 EST<\/code><\/pre>\n<\/p>\n

\/etc\/\u95ee\u9898\u6587\u4ef6<\/p>\n

\u4f7f\u7528more\u547d\u4ee4\/less\u547d\u4ee4\u5982\u4e0b\u663e\u793a\u5305\u542b\u7684\u5185\u5bb9\/etc\/issue\uff1a<\/p>\n

\n

\ncat \/etc\/issue\nmore \/etc\/issue\nless \/etc\/issue<\/code><\/pre>\n<\/p>\n

\u4ee5\u4e0a\u5c31\u662f\u5173\u4e8e\u201c\u4f7f\u7528Linux\u67e5\u770b\u64cd\u4f5c\u7cfb\u7edf\u7248\u672c\u201d\u4ecb\u7ecdlinux\u67e5\u770b\u7248\u672c5\u8fd8\u662f6<\/strong>\uff0c\u4f60\u4eec\u5047\u5982\u60f3\u4e86\u89e3\u66f4\u591a\u76f8\u5173\u77e5\u8bc6linux\u5f00\u6e90\u8f6f\u4ef6\uff0c\u53ef\u4ee5\u5173\u6ce8\u4e00\u4e0b\u52a8\u529b\u8282\u70b9\u7684Linux\u6559\u7a0blinux\u67e5\u770b\u7248\u672c5\u8fd8\u662f6<\/strong>\uff0c\u4e0a\u9762\u7684\u8bfe\u7a0b\u5185\u5bb9\u7ec6\u81f4\u5168\u9762linux\u6a21\u62df\uff0c\u5f88\u9002\u5b9c\u6ca1\u6709\u57fa\u7840\u7684\u7537\u5b50\u4f34\u5b66\u4e60\uff0c\u5e0c\u671b\u5bf9\u4f60\u4eec\u5c31\u80fd\u6709\u6240\u5e2e\u52a9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u4e2d\u7684\u64cd\u4f5c\u7cfb\u7edf\u7248\u672c\u4e0a\u67e5\u627e\u64cd\u4f5c\u7cfb\u7edf\u540d\u79f0\u548c\u7248\u672c\u7684\u8fc7\u7a0b\uff1a\u4e2d\u67e5\u627e\u64cd\u4f5c\u7cfb\u7edf\u540d\u79f0\u548c\u7248\u672c\uff1aOS(\u64cd\u4f5c\u7cfb\u7edf)\u4fe1\u606f\uff0c\u5305\u62ec\u7248\u672c\uff1a\u4e0a\u7684\u64cd\u4f5c\u7cfb\u7edf\u7248\u672c\u547d\u4ee4\u67e5\u8be2\u548c\u66f4\u6539\u7cfb\u7edf\u4e3b\u673a\u540d\u53ca\u76f8\u5173\u8bbe\u7f6e\u3002\u6ce8\u610f\u201c\u64cd\u4f5c\u7cfb\u7edf\u201d\u548c\u201c\u5185\u6838\u201d\uff1a\u4ee5\u4e0a\u5c31\u662f\u5173\u4e8e\u201c\u4f7f\u7528Linux\u67e5\u770b\u64cd\u4f5c\u7cfb\u7edf\u7248\u672c\u201d\u4ecb\u7ecd\uff0c\u5927\u5bb6\u5982\u679c\u60f3\u4e86\u89e3\u66f4\u591a\u76f8\u5173\u77e5\u8bc6\uff0c\u53ef\u4ee5\u5173\u6ce8\u4e00\u4e0b\u52a8\u529b\u8282\u70b9\u7684Linux\u6559\u7a0b\uff0c\u91cc\u9762\u7684\u8bfe\u7a0b\u5185\u5bb9\u7ec6\u81f4\u5168\u9762\uff0c\u5f88\u9002\u5408\u6ca1\u6709\u57fa\u7840\u7684\u5c0f\u4f19\u4f34\u5b66\u4e60\uff0c\u5e0c\u671b\u5bf9\u5927\u5bb6\u80fd\u591f\u6709\u6240\u5e2e\u52a9\u3002<\/p>\n","protected":false},"author":1,"featured_media":271651,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-271650","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/271650","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/comments?post=271650"}],"version-history":[{"count":0,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/271650\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media\/271651"}],"wp:attachment":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media?parent=271650"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/categories?post=271650"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/tags?post=271650"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}