{"id":2202,"date":"2025-07-31T15:48:49","date_gmt":"2025-07-31T07:48:49","guid":{"rendered":"https:\/\/www.madbull.site\/?p=2202"},"modified":"2025-10-27T17:25:00","modified_gmt":"2025-10-27T09:25:00","slug":"linux%e7%8e%af%e5%a2%83%e4%b8%8b%e7%9a%84%e4%b8%80%e4%ba%9b%e6%8c%87%e4%bb%a4-%e6%8c%81%e7%bb%ad%e8%ae%b0%e5%bd%95","status":"publish","type":"post","link":"https:\/\/www.madbull.site\/?p=2202","title":{"rendered":"linux\u4e0b\u7684\u4e00\u4e9b\u6307\u4ee4&#8212;-\u6301\u7eed\u8bb0\u5f55"},"content":{"rendered":"\n<p>1\u3001\u4f7f\u7528\u5149\u76d8\u5236\u4f5c\u7cfb\u7edf\u5b89\u88c5\u76d8<\/p>\n\n\n\n<p>\u68c0\u67e5\u5149\u76d8\u662f\u5426\u53ef\u5199\uff1awodim dev=\/dev\/sr1 &#8211;checkdrive<\/p>\n\n\n\n<p>\u628a iso \u6587\u4ef6\u523b\u5f55\u5230\u5149\u76d8\uff1awodim -v dev=\/dev\/sr1 speed=8 -eject proxmox-ve_8.4-1.iso<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"665\" height=\"675\" src=\"https:\/\/www.madbull.site\/wp-content\/uploads\/2025\/07\/111-2.png\" alt=\"\" class=\"wp-image-2205\"\/><\/figure>\n\n\n\n<p>2\u3001dmidecode\u67e5\u8be2\u786c\u4ef6\u4fe1\u606f<\/p>\n\n\n\n<p>dmidecode -t memory \u67e5\u8be2\u5185\u5b58\u6761\u4fe1\u606f<\/p>\n\n\n\n<p>dmidecode -t system \u67e5\u8be2\u7cfb\u7edf\u4fe1\u606f<\/p>\n\n\n\n<p>dmidecode -t baseboard \u67e5\u8be2\u4e3b\u677f\u4fe1\u606f<\/p>\n\n\n\n<p>dmidecode -t processor \u67e5\u8be2CPU\u4fe1\u606f<\/p>\n\n\n\n<p>dmidecode -t cache \u67e5\u8be2CPU\u7f13\u5b58\u4fe1\u606f<\/p>\n\n\n\n<p>dmidecode -t slot \u67e5\u8be2\u5361\u69fd\u4fe1\u606f\uff0cPCI PCIE\u4fe1\u606f<\/p>\n\n\n\n<p>dmidecode -t bios \u67e5\u8be2bios\u4fe1\u606f<\/p>\n\n\n\n<p>dmidecode -t chassis \u67e5\u8be2\u673a\u7bb1\u4fe1\u606f<\/p>\n\n\n\n<p>3\u3001\u67e5\u770b\u7cfb\u7edf\u8fd0\u884c\u529f\u7387\uff0c\u5982\u679cCPU\u652f\u6301RAPL(IntelCPU)\uff0c\u53ef\u4ee5\u4f7f\u7528 powerstat -R \u6307\u4ee4<\/p>\n\n\n\n<p>4\u3001ifconfig \u7b49\u7f51\u7edc\u7ba1\u7406\u5de5\u5177\u9700\u8981\u5b89\u88c5 net-tools \u5de5\u5177\u5305<\/p>\n\n\n\n<p>5\u3001\u67e5\u770b\u5f53\u524d\u684c\u9762\u7ba1\u7406\u5668\uff1acat \/etc\/X11\/default-display-manager<\/p>\n\n\n\n<p>\u67e5\u770b\u5f53\u524d\u684c\u9762\u73af\u5883\uff1aecho $XDG_CURRENT_DESKTOP<\/p>\n\n\n\n<p>LightDM \u548c XFCE \u7684\u5173\u7cfb\u5728\u4e8e\uff0cLightDM \u53ef\u4ee5\u914d\u7f6e\u4e3a\u542f\u52a8 XFCE \u684c\u9762\u73af\u5883\u4f5c\u4e3a\u7528\u6237\u7684\u9ed8\u8ba4\u4f1a\u8bdd\u7c7b\u578b\u4e4b\u4e00\u3002\u6362\u53e5\u8bdd\u8bf4\uff0c\u5f53\u4f60\u4f7f\u7528 LightDM \u767b\u5f55\u65f6\uff0c\u4f60\u53ef\u4ee5\u9009\u62e9\u8fdb\u5165 XFCE \u684c\u9762\u73af\u5883\u3002\u8fd9\u901a\u5e38\u6d89\u53ca\u5230\u5728 LightDM \u7684\u914d\u7f6e\u6587\u4ef6\u4e2d\u6307\u5b9a XFCE \u4f5c\u4e3a\u53ef\u7528\u7684\u4f1a\u8bdd\u4e4b\u4e00\uff0c\u8fd9\u6837\u5f53\u7528\u6237\u767b\u5f55\u65f6\u53ef\u4ee5\u9009\u62e9 XFCE \u4f5c\u4e3a\u5176\u684c\u9762\u73af\u5883\u3002<\/p>\n\n\n\n<p>6\u3001\u4fee\u6539\u4e3b\u673a\u540d\u79f0\uff0c\u4e0d\u7528\u91cd\u542f\u5c31\u53ef\u751f\u6548\uff1ahostnamectl set-hostname new-hostname\uff0c\u5f53\u524d\u7ec8\u7aef\u9700\u8981\u6ce8\u9500\u91cd\u65b0\u767b\u5f55\u3002<\/p>\n\n\n\n<p>7\u3001strings\u5de5\u5177\u9700\u8981\u5b89\u88c5\uff1aapt install binutils<\/p>\n\n\n\n<p>8\u3001\u8bbe\u7f6e\u65f6\u533a\uff1atimedatectl set-timezone Asia\/Shanghai \u3002\u6c38\u4e45\u751f\u6548\u3002<\/p>\n\n\n\n<p>\u67e5\u770b\u6709\u54ea\u4e9b\u53ef\u4ee5\u8bbe\u7f6e\u7684\u65f6\u533a\uff1atimedatectl list-timezones<\/p>\n\n\n\n<p>9\u3001\u83b7\u53d6https\u7f51\u7ad9\u8bc1\u4e66\u7684\u65b9\u6cd5\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo | openssl s_client -connect www.baidu.com:443 2&gt;\/dev\/null | openssl x509 &gt; \/tmp\/gitlab-cert.pem<\/code><\/pre>\n\n\n\n<p>10\u3001linux\u684c\u9762 \u60f3\u8981 mstsc \u8fdc\u7a0b\uff0c\u53ef\u4ee5\u5b89\u88c5 xrdp \u670d\u52a1\u3002<\/p>\n\n\n\n<p>11\u3001tar Ppvf AAAAA.tar &#8211;delete xxxx  \uff1a\u4ece AAAAA.tar \u5305\u91cc\u5220\u9664 xxxx \u6587\u4ef6<\/p>\n\n\n\n<p>tar Ppvf AAAAA.tar -r yyyy \uff1a\u7ed9 AAAAA.tar \u5305\u8ffd\u52a0 yyyy \u6587\u4ef6<\/p>\n\n\n\n<p>12\u3001\u5404\u4e2a <code>init<\/code> \u8fd0\u884c\u7ea7\u522b\u7684\u542b\u4e49\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u8fd0\u884c\u7ea7\u522b<\/th><th>\u4f5c\u7528<\/th><\/tr><\/thead><tbody><tr><td><code>init 0<\/code><\/td><td><strong>\u5173\u673a<\/strong>\uff08Shutdown\uff09<\/td><\/tr><tr><td><code>init 1<\/code><\/td><td>\u5355\u7528\u6237\u6a21\u5f0f\uff08Single user mode\uff09\uff0c\u7528\u4e8e\u7ef4\u62a4<\/td><\/tr><tr><td><code>init 2<\/code><\/td><td>\u591a\u7528\u6237\u6a21\u5f0f\uff0c\u65e0\u7f51\u7edc\uff08NFS\uff09\u670d\u52a1\uff08Debian\/Ubuntu \u4e2d\u4e0d\u662f\u8fd9\u6837\uff09<\/td><\/tr><tr><td><code>init 3<\/code><\/td><td>\u591a\u7528\u6237\u6a21\u5f0f\uff0c\u5e26\u7f51\u7edc\uff0c<strong>\u6587\u672c\u754c\u9762\uff08\u547d\u4ee4\u884c\uff09<\/strong><\/td><\/tr><tr><td><code>init 4<\/code><\/td><td>\u7528\u6237\u81ea\u5b9a\u4e49\u7ea7\u522b\uff08\u901a\u5e38\u672a\u4f7f\u7528\uff09<\/td><\/tr><tr><td><code>init 5<\/code><\/td><td>\u591a\u7528\u6237\u6a21\u5f0f\uff0c\u5e26\u7f51\u7edc\uff0c<strong>\u56fe\u5f62\u754c\u9762\uff08GUI\uff09<\/strong><\/td><\/tr><tr><td><code>init 6<\/code><\/td><td><strong>\u91cd\u542f\u7cfb\u7edf<\/strong>\uff08Reboot\uff09 \u2705<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>13\u3001\u91cd\u542f\u7cfb\u7edf\u7684\u51e0\u79cd\u65b9\u6cd5<\/p>\n\n\n\n<p>a\u3001reboot<\/p>\n\n\n\n<p>b\u3001init 6<\/p>\n\n\n\n<p>c\u3001\u5c1d\u8bd5\u901a\u8fc7\u5185\u6838\u786c\u91cd\u542f\uff0c\u53ef\u80fd\u4f1a\u7834\u574f\u6587\u4ef6\u7cfb\u7edf\uff1aecho 1 &gt; \/proc\/sys\/kernel\/sysrq; echo b &gt; \/proc\/sysrq-trigger<\/p>\n\n\n\n<p>d\u3001systemctl reboot<\/p>\n\n\n\n<p>e\u3001shutdown -r now<\/p>\n\n\n\n<p>f\u3001\u6740\u6b7b\u6240\u6709\u8fdb\u7a0b\uff0c\u89e6\u53d1\u5185\u6838\u91cd\u542f<\/p>\n\n\n\n<p>g\u3001reboot -f<\/p>\n\n\n\n<p># 1. \u540c\u6b65\u6570\u636e\u5230\u78c1\u76d8\uff08\u5c3d\u53ef\u80fd\u4fdd\u62a4\u6570\u636e\uff09 sync <\/p>\n\n\n\n<p># 2. \u6740\u6b7b\u6240\u6709\u8fdb\u7a0b\uff0c\u8fdb\u5165 emergency \u6a21\u5f0f\uff1a2.1 \u5c1d\u8bd5\u5b89\u5168\u540c\u6b65\uff1aecho s &gt; \/proc\/sysrq-trigger;  2.2 \u91cd\u65b0\u6302\u8f7d\u6240\u6709\u6587\u4ef6\u7cfb\u7edf\u4e3a\u53ea\u8bfb\uff08\u9632\u6b62\u635f\u574f\uff09\uff1aecho u &gt; \/proc\/sysrq-trigger <\/p>\n\n\n\n<p># 3. \u6700\u540e\u5f3a\u5236\u91cd\u542f echo b &gt; \/proc\/sysrq-trigger <\/p>\n","protected":false},"excerpt":{"rendered":"<p>1\u3001\u4f7f\u7528\u5149\u76d8\u5236\u4f5c\u7cfb\u7edf\u5b89\u88c5\u76d8 \u68c0\u67e5\u5149\u76d8\u662f\u5426\u53ef\u5199\uff1awodim dev=\/dev\/sr1 &#8211;checkd [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":450,"comment_status":"open","ping_status":"open","sticky":false,"template":"wp-custom-template-my","format":"standard","meta":{"footnotes":""},"categories":[135,131],"tags":[237],"class_list":["post-2202","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-131","tag-linux"],"_links":{"self":[{"href":"https:\/\/www.madbull.site\/index.php?rest_route=\/wp\/v2\/posts\/2202","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.madbull.site\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.madbull.site\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.madbull.site\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.madbull.site\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2202"}],"version-history":[{"count":19,"href":"https:\/\/www.madbull.site\/index.php?rest_route=\/wp\/v2\/posts\/2202\/revisions"}],"predecessor-version":[{"id":2420,"href":"https:\/\/www.madbull.site\/index.php?rest_route=\/wp\/v2\/posts\/2202\/revisions\/2420"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.madbull.site\/index.php?rest_route=\/wp\/v2\/media\/450"}],"wp:attachment":[{"href":"https:\/\/www.madbull.site\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2202"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.madbull.site\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2202"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.madbull.site\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2202"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}