{"id":27433,"date":"2025-04-24T23:34:19","date_gmt":"2025-04-25T02:34:19","guid":{"rendered":"https:\/\/mastertrend.info\/?p=27433"},"modified":"2026-04-28T13:23:13","modified_gmt":"2026-04-28T16:23:13","slug":"%e7%b3%bb%e7%bb%9f%e6%8e%a7%e5%88%b6","status":"publish","type":"post","link":"https:\/\/mastertrend.info\/zh\/systemctl\/","title":{"rendered":"systemctl\uff1a12 \u4e2a\u6b65\u9aa4\u5373\u53ef\u5b8c\u5168\u63a7\u5236 Linux"},"content":{"rendered":"<h2>systemctl\uff1a\u638c\u63e1 Linux \u7684 12 \u4e2a\u547d\u4ee4<\/h2>\n<p>systemctl \u547d\u4ee4\u6709\u51e0\u4e2a\u7ecf\u5e38\u88ab\u5ffd\u89c6\u7684\u529f\u80fd\u3002\u9664\u4e86\u5728 Linux \u4e2d\u542f\u52a8\u548c\u505c\u6b62\u670d\u52a1\u4e4b\u5916\uff0c\u60a8\u8fd8\u53ef\u4ee5\u5217\u51fa\u5df2\u5b89\u88c5\u7684\u670d\u52a1\u5e76\u68c0\u67e5\u5176\u72b6\u6001\u3002\u8ba9\u6211\u4eec\u5feb\u901f\u56de\u987e\u4e00\u4e0b\uff01 \ud83d\ude80<\/p>\n<p><!-- No winning ad found for zone: below first paragraph! --><!-- No winning ad found for zone: native in content! --><\/p>\n<h2 id=\"the-systemctl-command\">Systemctl \u547d\u4ee4\u662f\u4ec0\u4e48\uff1f<\/h2>\n<p>\u8be5\u547d\u4ee4 <a class=\"wpil_keyword_link\" href=\"https:\/\/mastertrend.info\/zh\/chatgpt-%e5%bb%ba%e8%ae%ae\/\" target=\"_blank\" rel=\"noopener\" title=\"ChatGPT\u63a8\u8350\uff1a\u79d2\u901f\u5448\u73b0\u524d4\u540d\uff01\ud83c\udfa5\ud83d\udcda\" data-wpil-keyword-link=\"linked\" data-wpil-monitor-id=\"7065\">\u7cfb\u7edf\u63a7\u5236<\/a> es la herramienta central de gesti\u00f3n del sistema init systemd, conocida principalmente como la herramienta que se usa para iniciar y detener servicios. Pero hay mucho m\u00e1s, como lo demuestra su p\u00e1gina de manual que tiene m\u00e1s de 1600 l\u00edneas. \ud83d\udcd6<\/p>\n<p>\u56e0\u4e3a systemctl \u662f\u4e00\u4e2a\u7ba1\u7406\u5de5\u5177\uff0c\u800c\u4e0d\u4ec5\u4ec5\u662f\u4e00\u4e2a\u670d\u52a1\u542f\u52a8\u5668\uff0c\u6240\u4ee5\u60a8\u53ef\u4ee5\u4f7f\u7528\u5b83\u6765\u8bbf\u95ee\u6709\u5173\u60a8\u7684\u7cfb\u7edf\u53ca\u5176 systemd \u670d\u52a1\u7684\u6709\u7528\u4fe1\u606f\u3002 \ud83d\udcbb<\/p>\n<p>\u5927\u591a\u6570 Linux \u53d1\u884c\u7248\u90fd\u91c7\u7528\u4e86 systemd\uff0c\u4f46\u6709\u4e9b\u53d1\u884c\u7248\u9009\u62e9\u4fdd\u7559\u4f20\u7edf\u7684 SystemV init \u7cfb\u7edf\u3002\u5982\u679c\u60a8\u4e0d\u786e\u5b9a\u60a8\u7684\u53d1\u884c\u7248\u4f7f\u7528\u54ea\u4e00\u4e2a\uff0c\u90a3\u4e48\u5f88\u5bb9\u6613\u627e\u51fa\u7b54\u6848\u3002\u6211\u4eec\u5c06\u4f7f\u7528 stat \u547d\u4ee4\u6765\u67e5\u770b init \u6587\u4ef6\u3002<\/p>\n<pre><code class=\"hljs bash\"><span class=\"hljs-built_in\">\u7edf\u8ba1<\/span> \/sbin\/init <\/code><\/pre>\n<figure>     <img decoding=\"async\" style=\"height: auto;max-width: 100%\" src=\"https:\/\/mastertrend.info\/wp-content\/uploads\/2024\/12\/Estos-12-comandos-de-systemctl-te-permitiran-tomar-el-control.png\" alt=\"\u4f7f\u7528 stat \u547d\u4ee4\u67e5\u770b Linux \u5b89\u88c5\u662f\u5426\u4f7f\u7528 SystemV \u6216 systemd\u3002\" width=\"1010\" height=\"370\" data-img-url=\"https:\/\/mastertrend.info\/wp-content\/uploads\/2024\/12\/Estos-12-comandos-de-systemctl-te-permitiran-tomar-el-control.png\" title=\"\"><\/figure>\n<p>\/sbin\/init \u53ef\u6267\u884c\u6587\u4ef6\u662f\u57fa\u4e8e SystemV \u7684\u53d1\u884c\u7248\u4e2d\u542f\u52a8\u7684\u7b2c\u4e00\u4e2a\u8fdb\u7a0b\u3002\u5728\u57fa\u4e8e systemd \u7684\u53d1\u884c\u7248\u4e2d\uff0c\u5177\u6709\u8be5\u540d\u79f0\u7684\u7b26\u53f7\u94fe\u63a5\u6307\u5411 systemd\u3002<\/p>\n<p>\u8f93\u51fa\u7684\u7b2c\u4e00\u884c\u663e\u793a\uff0c\u5728\u8fd9\u53f0 Ubuntu \u6d4b\u8bd5\u673a\u4e0a\uff0c\/sbin\/init \u662f\u6587\u4ef6 \/lib\/systemd\/systemd \u7684\u7b26\u53f7\u94fe\u63a5\u3002\u663e\u7136\uff0c\u6b64 Linux \u5b89\u88c5\u4f7f\u7528\u4e86 systemd\u3002\u5982\u679c\u5b83\u662f\u57fa\u4e8e SystemV \u7684\u53d1\u884c\u7248\uff0c\u5219\u8be5\u884c\u5c06\u4ec5\u5305\u542b\u201cFile: \/sbin\/init\u201d\u3002<\/p>\n<h2 id=\"interrogating-services-with-systemctl\">\u4f7f\u7528 systemctl \u8be2\u95ee\u670d\u52a1<\/h2>\n<p>\u670d\u52a1\u5728\u5355\u5143\u6587\u4ef6\u4e2d\u5b9a\u4e49\uff0c\u60a8\u4f1a\u5728 systemctl \u9009\u9879\u4e2d\u770b\u5230\u5355\u8bcd unit \u5206\u6563\u51fa\u73b0\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528 \u2013type \u9009\u9879\u901a\u8fc7 list-units \u547d\u4ee4\u83b7\u53d6\u670d\u52a1\u5217\u8868\u3002<\/p>\n<pre><code class=\"hljs php\">\u7cfb\u7edf\u63a7\u5236 <span class=\"hljs-keyword\">\u5217\u8868<\/span>-\u5355\u4f4d--\u7c7b\u578b=\u670d\u52a1<\/code><\/pre>\n<figure>     <img decoding=\"async\" style=\"height: auto;max-width: 100%\" src=\"https:\/\/mastertrend.info\/wp-content\/uploads\/2024\/12\/1733610363_948_Estos-12-comandos-de-systemctl-te-permitiran-tomar-el-control.png\" alt=\"systemctl list-units \u547d\u4ee4\u7684\u8f93\u51fa\uff0c\u663e\u793a\u6b63\u5728\u8fd0\u884c\u548c\u5df2\u505c\u6b62\u7684\u670d\u52a1\u3002\" width=\"1010\" height=\"625\" data-img-url=\"https:\/\/mastertrend.info\/wp-content\/uploads\/2024\/12\/1733610363_948_Estos-12-comandos-de-systemctl-te-permitiran-tomar-el-control.png\" title=\"\"><\/figure>\n<p>\u8f93\u51fa\u663e\u793a\u5728 less \u6587\u4ef6\u67e5\u770b\u5668\u4e2d\uff0c\u5141\u8bb8\u60a8\u5bfc\u822a\u5e76\u4f7f\u7528 \/ \u952e\u8fdb\u884c\u641c\u7d22\u3002<\/p>\n<ul>\n<li><strong>\u5355\u5143<\/strong>\uff1a\u5355\u5143\u6587\u4ef6\u7684\u540d\u79f0\u3002<\/li>\n<li><strong>\u643a\u5e26<\/strong>\uff1a\u5982\u679c\u670d\u52a1\u5355\u5143\u6587\u4ef6\u88ab\u8bfb\u5165\u5185\u5b58\u800c\u6ca1\u6709\u8bed\u6cd5\u9519\u8bef\uff0c\u5219\u6b64\u5217\u5c06\u663e\u793a\u201c\u5df2\u52a0\u8f7d\u201d\u3002\u8fd9\u5e76\u4e0d\u610f\u5473\u7740\u8be5\u670d\u52a1\u5904\u4e8e\u6d3b\u52a8\u72b6\u6001\u3002<\/li>\n<li><strong>\u8d44\u4ea7<\/strong>\uff1a\u670d\u52a1\u662f\u5426\u5904\u4e8e\u6d3b\u52a8\u72b6\u6001\u7684\u6982\u8ff0\u3002\u6d3b\u52a8\u670d\u52a1\u53ef\u80fd\u672a\u8fd0\u884c\u3002<\/li>\n<li><strong>\u5b50<\/strong>\uff1a\u66f4\u8be6\u7ec6\u5730\u67e5\u770b\u670d\u52a1\u662f\u5426\u6b63\u5728\u8fd0\u884c\u3002\u4f8b\u5982\uff0c\u6d3b\u52a8\u670d\u52a1\u53ef\u80fd\u88ab\u5b89\u6392\u7528\u4e8e\u8ba1\u65f6\u5668\uff0c\u5e76\u4e14\u53ef\u80fd\u5df2\u9000\u51fa\u5176\u6700\u540e\u4e00\u6b21\u8fd0\u884c\u3002<\/li>\n<li><strong>\u63cf\u8ff0<\/strong>\uff1a\u7528\u4e8e\u8bc6\u522b\u6216\u63cf\u8ff0\u670d\u52a1\u7684\u4e00\u884c\u6587\u672c\u3002<\/li>\n<\/ul>\n<p>\u663e\u793a\u4ec5\u5305\u62ec\u6d3b\u52a8\u670d\u52a1\u3002\u8981\u67e5\u770b\u6240\u6709\u670d\u52a1\uff0c\u6211\u4eec\u9700\u8981\u5305\u542b \u2013all \u9009\u9879\u3002<\/p>\n<pre><code class=\"hljs php\">\u7cfb\u7edf\u63a7\u5236 <span class=\"hljs-keyword\">\u5217\u8868<\/span>-\u5355\u4f4d--all--\u7c7b\u578b=\u670d\u52a1<\/code><\/pre>\n<figure>     <img decoding=\"async\" style=\"height: auto;max-width: 100%\" src=\"https:\/\/mastertrend.info\/wp-content\/uploads\/2024\/12\/1733610363_218_Estos-12-comandos-de-systemctl-te-permitiran-tomar-el-control.png\" alt=\"systemctl list-units \u547d\u4ee4\u7684\u8f93\u51fa\uff0c\u663e\u793a\u6240\u6709\u670d\u52a1\u3002\" width=\"1010\" height=\"625\" data-img-url=\"https:\/\/mastertrend.info\/wp-content\/uploads\/2024\/12\/1733610363_218_Estos-12-comandos-de-systemctl-te-permitiran-tomar-el-control.png\" title=\"\"><\/figure>\n<p>\u5982\u679c\u67e5\u770b\u6240\u6709\u5185\u5bb9\u592a\u9ebb\u70e6\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528 \u2013state \u9009\u9879\u8fc7\u6ee4\u8f93\u51fa\u3002<\/p>\n<pre><code class=\"hljs php\">\u7cfb\u7edf\u63a7\u5236 <span class=\"hljs-keyword\">\u5217\u8868<\/span>-units --type=service --state=running<\/code><\/pre>\n<figure>     <img decoding=\"async\" style=\"height: auto;max-width: 100%\" src=\"https:\/\/mastertrend.info\/wp-content\/uploads\/2024\/12\/1733610363_378_Estos-12-comandos-de-systemctl-te-permitiran-tomar-el-control.png\" alt=\"systemctl list-units \u547d\u4ee4\u7684\u8f93\u51fa\uff0c\u7ecf\u8fc7\u8fc7\u6ee4\u4ec5\u663e\u793a\u6b63\u5728\u8fd0\u884c\u7684\u670d\u52a1\u3002\" width=\"1010\" height=\"625\" data-img-url=\"https:\/\/mastertrend.info\/wp-content\/uploads\/2024\/12\/1733610363_378_Estos-12-comandos-de-systemctl-te-permitiran-tomar-el-control.png\" title=\"\"><\/figure>\n<p>\u72b6\u6001\u9009\u9879\u5c06\u63a5\u53d7\u6b63\u5728\u8fd0\u884c\u3001\u5df2\u505c\u6b62\u3001\u5df2\u542f\u7528\u3001\u5df2\u7981\u7528\u548c\u5df2\u5931\u8d25\u3002<\/p>\n<p>\u8981\u5173\u6ce8\u5931\u8d25\u7684\u670d\u52a1\uff0c\u8bf7\u4f7f\u7528 \u2013failed \u9009\u9879\u3002<\/p>\n<pre><code class=\"hljs php\">\u7cfb\u7edf\u63a7\u5236 <span class=\"hljs-keyword\">\u5217\u8868<\/span>-\u5355\u4f4d--\u5931\u8d25<\/code><\/pre>\n<figure>     <img decoding=\"async\" style=\"height: auto;max-width: 100%\" src=\"https:\/\/mastertrend.info\/wp-content\/uploads\/2024\/12\/1733610364_932_Estos-12-comandos-de-systemctl-te-permitiran-tomar-el-control.png\" alt=\"systemctl list-units \u547d\u4ee4\u7684\u8f93\u51fa\u7ecf\u8fc7\u8fc7\u6ee4\uff0c\u4ec5\u663e\u793a\u5931\u8d25\u7684\u670d\u52a1\u3002\u6ca1\u6709\u5931\u8d25\u7684\u670d\u52a1\u3002\" width=\"1010\" height=\"240\" data-img-url=\"https:\/\/mastertrend.info\/wp-content\/uploads\/2024\/12\/1733610364_932_Estos-12-comandos-de-systemctl-te-permitiran-tomar-el-control.png\" title=\"\"><\/figure>\n<p>\u6b64\u8ba1\u7b97\u673a\u4e0a\u6ca1\u6709\u6545\u969c\u9a71\u52a8\u5668\u3002<\/p>\n<p>\u5982\u679c\u60a8\u53d1\u73b0\u4efb\u4f55\u5931\u8d25\u7684\u670d\u52a1\uff0c\u8bf7\u4f7f\u7528 list-dependencies \u9009\u9879\u68c0\u67e5\u672a\u6ee1\u8db3\u7684\u4f9d\u8d56\u5173\u7cfb\u3002<\/p>\n<pre><code class=\"hljs php\">\u7cfb\u7edf\u63a7\u5236 <span class=\"hljs-keyword\">\u5217\u8868<\/span>-dependencies sshd.service<\/code><\/pre>\n<figure>     <img decoding=\"async\" style=\"height: auto;max-width: 100%\" src=\"https:\/\/mastertrend.info\/wp-content\/uploads\/2024\/12\/1733610364_593_Estos-12-comandos-de-systemctl-te-permitiran-tomar-el-control.png\" alt=\"systemctl list-dependencies \u547d\u4ee4\u7684\u8f93\u51fa\u663e\u793a\u4e86 sshd \u670d\u52a1\u7684\u4f9d\u8d56\u9879\u3002\" width=\"1010\" height=\"625\" data-img-url=\"https:\/\/mastertrend.info\/wp-content\/uploads\/2024\/12\/1733610364_593_Estos-12-comandos-de-systemctl-te-permitiran-tomar-el-control.png\" title=\"\"><\/figure>\n<p>\u4f9d\u8d56\u5173\u7cfb\u6709\u4e00\u4e2a\u5f69\u8272\u5706\u5708\u4ee3\u8868\u5176\u72b6\u6001\u3002\u53ef\u80fd\u662f\uff1a<\/p>\n<ul>\n<li><strong>\u767d\u5708<\/strong>\uff1a\u4e0d\u6d3b\u8dc3\u6216\u6b63\u5728\u7ef4\u62a4<\/li>\n<li><strong>\u7eff\u70b9<\/strong>\uff1a \u8d44\u4ea7\u3002<\/li>\n<li><strong>\u767d\u70b9<\/strong>\uff1a\u6b63\u5728\u505c\u7528\u3002<\/li>\n<li><strong>\u7ea2\u70b9<\/strong>\uff1a\u5931\u8d25\u6216\u9519\u8bef\u3002<\/li>\n<\/ul>\n<p>\u8981\u68c0\u67e5\u5355\u4e2a\u670d\u52a1\u662f\u5426\u542f\u7528\uff0c\u8bf7\u4f7f\u7528 is-enabled \u547d\u4ee4\u5e76\u63d0\u4f9b\u8be5\u670d\u52a1\u7684\u5355\u5143\u6587\u4ef6\u7684\u540d\u79f0\u3002<\/p>\n<pre><code class=\"hljs python\">\u7cfb\u7edf\u63a7\u5236 <span class=\"hljs-keyword\">es<\/span>-\u542f\u7528 htg-example.service<\/code><\/pre>\n<figure>     <img decoding=\"async\" style=\"height: auto;max-width: 100%\" src=\"https:\/\/mastertrend.info\/wp-content\/uploads\/2024\/12\/1733610364_509_Estos-12-comandos-de-systemctl-te-permitiran-tomar-el-control.png\" alt=\"\u4f7f\u7528 systemctl is-enabled \u6765\u786e\u5b9a\u7279\u5b9a\u670d\u52a1\u662f\u5426\u542f\u7528\u3002\" width=\"1010\" height=\"200\" data-img-url=\"https:\/\/mastertrend.info\/wp-content\/uploads\/2024\/12\/1733610364_509_Estos-12-comandos-de-systemctl-te-permitiran-tomar-el-control.png\" title=\"\"><\/figure>\n<h2 id=\"controlling-services-with-systemctl\">\u4f7f\u7528 systemctl \u63a7\u5236\u670d\u52a1<\/h2>\n<p>\u4f7f\u7528 systemctl \u7ba1\u7406\u670d\u52a1\u975e\u5e38\u7b80\u5355\uff0c\u5e76\u4e14\u9075\u5faa\u6211\u4eec\u8fc4\u4eca\u4e3a\u6b62\u6240\u89c1\u7684\u547d\u4ee4\u7684\u683c\u5f0f\u3002\u6700\u5927\u7684\u533a\u522b\u662f\u60a8\u9700\u8981\u4f7f\u7528 sudo \u6765\u66f4\u6539\u670d\u52a1\u72b6\u6001\u3002\u6211\u4eec\u5230\u73b0\u5728\u8fd8\u6ca1\u6709\u8fd9\u6837\u505a\uff0c\u56e0\u4e3a\u6211\u4eec\u53ea\u62a5\u544a\u670d\u52a1\u7684\u72b6\u6001\u3002<\/p>\n<p>\u8981\u542f\u52a8\u670d\u52a1\uff0c\u8bf7\u4f7f\u7528\u542f\u52a8\u547d\u4ee4\uff0c\u540e\u8ddf\u670d\u52a1\u540d\u79f0\u3002<\/p>\n<pre><code class=\"hljs css\"><span class=\"hljs-selector-tag\">\u6c57<\/span>\u00a0<span class=\"hljs-selector-tag\">\u7cfb\u7edf\u63a7\u5236<\/span>\u00a0<span class=\"hljs-selector-tag\">\u5f00\u59cb<\/span>\u00a0<span class=\"hljs-selector-tag\">htg-\u793a\u4f8b<\/span><span class=\"hljs-selector-class\">\u3002\u670d\u52a1<\/span><\/code><\/pre>\n<figure>     <img decoding=\"async\" style=\"height: auto;max-width: 100%\" src=\"https:\/\/mastertrend.info\/wp-content\/uploads\/2024\/12\/1733610364_181_Estos-12-comandos-de-systemctl-te-permitiran-tomar-el-control.png\" alt=\"\u4f7f\u7528 systemctl start \u547d\u4ee4\u542f\u52a8\u670d\u52a1\u3002\" width=\"1010\" height=\"180\" data-img-url=\"https:\/\/mastertrend.info\/wp-content\/uploads\/2024\/12\/1733610364_181_Estos-12-comandos-de-systemctl-te-permitiran-tomar-el-control.png\" title=\"\"><\/figure>\n<p>\u5982\u679c\u4e00\u5207\u987a\u5229\uff0c\u60a8\u5c06\u9759\u9ed8\u5730\u8fd4\u56de\u5230\u547d\u4ee4\u63d0\u793a\u7b26\u3002\u5982\u679c\u60a8\u5e0c\u671b\u5f97\u5230\u80af\u5b9a\u7684\u786e\u8ba4\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u72b6\u6001\u547d\u4ee4\u8fdb\u884c\u9a8c\u8bc1\u3002<\/p>\n<pre><code class=\"hljs css\"><span class=\"hljs-selector-tag\">\u6c57<\/span>\u00a0<span class=\"hljs-selector-tag\">\u7cfb\u7edf\u63a7\u5236<\/span>\u00a0<span class=\"hljs-selector-tag\">\u5730\u4f4d<\/span>\u00a0<span class=\"hljs-selector-tag\">htg-\u793a\u4f8b<\/span><span class=\"hljs-selector-class\">\u3002\u670d\u52a1<\/span><\/code><\/pre>\n<figure>     <img decoding=\"async\" style=\"height: auto;max-width: 100%\" src=\"https:\/\/mastertrend.info\/wp-content\/uploads\/2024\/12\/1733610365_854_Estos-12-comandos-de-systemctl-te-permitiran-tomar-el-control.png\" alt=\"\u4f7f\u7528 systemctl status \u547d\u4ee4\u68c0\u67e5\u670d\u52a1\u7684\u72b6\u6001\u3002\" width=\"1010\" height=\"590\" data-img-url=\"https:\/\/mastertrend.info\/wp-content\/uploads\/2024\/12\/1733610365_854_Estos-12-comandos-de-systemctl-te-permitiran-tomar-el-control.png\" title=\"\"><\/figure>\n<p>\u505c\u6b62\u670d\u52a1\u4e0e\u542f\u52a8\u670d\u52a1\u4e00\u6837\u7b80\u5355\u3002<\/p>\n<pre><code class=\"hljs css\"><span class=\"hljs-selector-tag\">\u6c57<\/span>\u00a0<span class=\"hljs-selector-tag\">\u7cfb\u7edf\u63a7\u5236<\/span>\u00a0<span class=\"hljs-selector-tag\">\u505c\u6b62<\/span>\u00a0<span class=\"hljs-selector-tag\">htg-\u793a\u4f8b<\/span><span class=\"hljs-selector-class\">\u3002\u670d\u52a1<\/span><\/code><\/pre>\n<figure>     <img decoding=\"async\" style=\"height: auto;max-width: 100%\" src=\"https:\/\/mastertrend.info\/wp-content\/uploads\/2024\/12\/1733610365_203_Estos-12-comandos-de-systemctl-te-permitiran-tomar-el-control.png\" alt=\"\u4f7f\u7528 systemctl stop \u547d\u4ee4\u505c\u6b62\u670d\u52a1\u3002\" width=\"1010\" height=\"175\" data-img-url=\"https:\/\/mastertrend.info\/wp-content\/uploads\/2024\/12\/1733610365_203_Estos-12-comandos-de-systemctl-te-permitiran-tomar-el-control.png\" title=\"\"><\/figure>\n<p>\u60a8\u53ef\u4ee5\u91cd\u65b0\u542f\u52a8\u670d\u52a1\uff0c\u800c\u4e0d\u5fc5\u7ecf\u8fc7\u505c\u6b62\u7136\u540e\u542f\u52a8\u5b83\u7684\u4e24\u6b65\u8fc7\u7a0b\u3002\u4ed6 <a title=\"Ubuntu \u65e0\u6cd5\u542f\u52a8\uff1f\ud83d\ude80 \u51e0\u5206\u949f\u5373\u53ef\u4fee\u590d\u3002\" href=\"https:\/\/mastertrend.info\/zh\/ubuntu-%e6%97%a0%e6%b3%95%e5%90%af%e5%8a%a8\/\" target=\"_blank\" rel=\"noopener\" data-wpil-monitor-id=\"5614\">\u91cd\u542f\u547d\u4ee4<\/a> \u4e3a\u60a8\u5b8c\u6210\u6240\u6709\u5de5\u4f5c\u3002<\/p>\n<pre><code class=\"hljs css\"><span class=\"hljs-selector-tag\">\u6c57<\/span>\u00a0<span class=\"hljs-selector-tag\">\u7cfb\u7edf\u63a7\u5236<\/span>\u00a0<span class=\"hljs-selector-tag\">\u91cd\u542f<\/span>\u00a0<span class=\"hljs-selector-tag\">htg-\u793a\u4f8b<\/span><span class=\"hljs-selector-class\">\u3002\u670d\u52a1<\/span><\/code><\/pre>\n<figure>     <img decoding=\"async\" style=\"height: auto;max-width: 100%\" src=\"https:\/\/mastertrend.info\/wp-content\/uploads\/2024\/12\/1733610365_846_Estos-12-comandos-de-systemctl-te-permitiran-tomar-el-control.png\" alt=\"\u4f7f\u7528 systemctl restart \u547d\u4ee4\u91cd\u65b0\u542f\u52a8\u670d\u52a1\u3002\" width=\"1010\" height=\"190\" data-img-url=\"https:\/\/mastertrend.info\/wp-content\/uploads\/2024\/12\/1733610365_846_Estos-12-comandos-de-systemctl-te-permitiran-tomar-el-control.png\" title=\"\"><\/figure>\n<p>\u5982\u679c\u60a8\u5e0c\u671b\u670d\u52a1\u5728\u542f\u52a8\u65f6\u542f\u52a8\uff0c\u5219\u9700\u8981\u542f\u7528\u5b83\u3002<\/p>\n<pre><code class=\"hljs css\"><span class=\"hljs-selector-tag\">\u6c57<\/span>\u00a0<span class=\"hljs-selector-tag\">\u7cfb\u7edf\u63a7\u5236<\/span>\u00a0<span class=\"hljs-selector-tag\">\u4f7f\u80fd\u591f<\/span>\u00a0<span class=\"hljs-selector-tag\">htg-\u793a\u4f8b<\/span><span class=\"hljs-selector-class\">\u3002\u670d\u52a1<\/span><\/code><\/pre>\n<figure>     <img decoding=\"async\" style=\"height: auto;max-width: 100%\" src=\"https:\/\/mastertrend.info\/wp-content\/uploads\/2024\/12\/1733610365_437_Estos-12-comandos-de-systemctl-te-permitiran-tomar-el-control.png\" alt=\"\u4f7f\u7528 systemctl enable \u547d\u4ee4\u542f\u7528\u670d\u52a1\u3002\" width=\"1010\" height=\"225\" data-img-url=\"https:\/\/mastertrend.info\/wp-content\/uploads\/2024\/12\/1733610365_437_Estos-12-comandos-de-systemctl-te-permitiran-tomar-el-control.png\" title=\"\"><\/figure>\n<p>\u8bf7\u6ce8\u610f\uff0c\u8fd9\u4ec5\u6807\u8bb0\u670d\u52a1\u5728\u542f\u52a8\u65f6\u542f\u52a8\uff0c\u800c\u4e0d\u662f\u7acb\u5373\u542f\u52a8\u3002\u5982\u679c\u8fd9\u662f\u60a8\u60f3\u8981\u7684\uff0c\u6211\u6dfb\u52a0\u4e86 \u2013now \u9009\u9879\u3002<\/p>\n<pre><code class=\"hljs css\"><span class=\"hljs-selector-tag\">\u6c57<\/span>\u00a0<span class=\"hljs-selector-tag\">\u7cfb\u7edf\u63a7\u5236<\/span>\u00a0<span class=\"hljs-selector-tag\">\u4f7f\u80fd\u591f<\/span>\u00a0<span class=\"hljs-selector-tag\">- \u73b0\u5728<\/span>\u00a0<span class=\"hljs-selector-tag\">htg-\u793a\u4f8b<\/span><span class=\"hljs-selector-class\">\u3002\u670d\u52a1<\/span><\/code><\/pre>\n<figure>     <img decoding=\"async\" style=\"height: auto;max-width: 100%\" src=\"https:\/\/mastertrend.info\/wp-content\/uploads\/2024\/12\/1733610365_854_Estos-12-comandos-de-systemctl-te-permitiran-tomar-el-control.png\" alt=\"\u4f7f\u7528 systemctl enable --now \u547d\u4ee4\u540c\u65f6\u542f\u7528\u548c\u542f\u52a8\u670d\u52a1\u3002\" width=\"1010\" height=\"210\" data-img-url=\"https:\/\/mastertrend.info\/wp-content\/uploads\/2024\/12\/1733610365_854_Estos-12-comandos-de-systemctl-te-permitiran-tomar-el-control.png\" title=\"\"><\/figure>\n<p>\u5f53\u60a8\u4e0d\u518d\u9700\u8981\u67d0\u9879\u670d\u52a1\u5728\u542f\u52a8\u65f6\u542f\u52a8\u65f6\uff0c\u8bf7\u7981\u7528\u5b83\u3002<\/p>\n<pre><code class=\"hljs css\"><span class=\"hljs-selector-tag\">\u6c57<\/span>\u00a0<span class=\"hljs-selector-tag\">\u7cfb\u7edf\u63a7\u5236<\/span>\u00a0<span class=\"hljs-selector-tag\">\u7981\u7528<\/span>\u00a0<span class=\"hljs-selector-tag\">htg-\u793a\u4f8b<\/span><span class=\"hljs-selector-class\">\u3002\u670d\u52a1<\/span><\/code><\/pre>\n<figure>     <img decoding=\"async\" style=\"height: auto;max-width: 100%\" src=\"https:\/\/mastertrend.info\/wp-content\/uploads\/2024\/12\/1733610365_595_Estos-12-comandos-de-systemctl-te-permitiran-tomar-el-control.png\" alt=\"\u4f7f\u7528 systemctl disable \u547d\u4ee4\u7981\u7528\u670d\u52a1\u3002\" width=\"1010\" height=\"200\" data-img-url=\"https:\/\/mastertrend.info\/wp-content\/uploads\/2024\/12\/1733610365_595_Estos-12-comandos-de-systemctl-te-permitiran-tomar-el-control.png\" title=\"\"><\/figure>\n<p>\u60a8\u53ef\u4ee5\u4f7f\u7528 journalctl \u547d\u4ee4\uff08systemd \u7684\u53e6\u4e00\u90e8\u5206\uff09\u6765\u67e5\u627e\u4e0e\u60a8\u7684\u670d\u52a1\u76f8\u5173\u7684\u6761\u76ee\u3002 -u\uff08\u5355\u4f4d\uff09\u9009\u9879\u5141\u8bb8\u60a8\u6307\u5b9a\u60a8\u611f\u5174\u8da3\u7684\u670d\u52a1\u3002\u4f7f\u7528 -S\uff08\u81ea\u4ece\uff09\u9009\u9879\uff0c\u60a8\u53ef\u4ee5\u663e\u793a\u81ea\u60a8\u63d0\u4f9b\u7684\u65f6\u95f4\u4ee5\u6765\u53d1\u751f\u7684\u6761\u76ee\u3002<\/p>\n<pre><code class=\"hljs css\"><span class=\"hljs-selector-tag\">journalctl<\/span>\u00a0<span class=\"hljs-selector-tag\">-S<\/span> \"08<span class=\"hljs-selector-pseudo\">:00<\/span><span class=\"hljs-selector-pseudo\">:00\"<\/span>\u00a0<span class=\"hljs-selector-tag\">-\u6216\u8005<\/span>\u00a0<span class=\"hljs-selector-tag\">htg-\u793a\u4f8b<\/span><span class=\"hljs-selector-class\">\u3002\u670d\u52a1<\/span><\/code><\/pre>\n<figure>     <img decoding=\"async\" style=\"height: auto;max-width: 100%\" src=\"https:\/\/mastertrend.info\/wp-content\/uploads\/2024\/12\/1733610366_799_Estos-12-comandos-de-systemctl-te-permitiran-tomar-el-control.png\" alt=\"\u4f7f\u7528 journalctl \u547d\u4ee4\u663e\u793a\u4e0e\u7279\u5b9a\u670d\u52a1\u76f8\u5173\u7684\u7cfb\u7edf\u65e5\u5fd7\u6761\u76ee\u3002\" width=\"1010\" height=\"625\" data-img-url=\"https:\/\/mastertrend.info\/wp-content\/uploads\/2024\/12\/1733610366_799_Estos-12-comandos-de-systemctl-te-permitiran-tomar-el-control.png\" title=\"\"><\/figure>\n<p>\u4efb\u4f55\u53ef\u4ee5\u5e2e\u52a9\u60a8\u7684\u5de5\u5177 <a title=\"Linux \u8d44\u6e90\u4f7f\u7528\u60c5\u51b5 \ud83d\udd27 \u8f7b\u677e\u4f18\u5316\" href=\"https:\/\/mastertrend.info\/zh\/linux-%e4%b8%ad%e7%9a%84%e8%b5%84%e6%ba%90%e4%bd%bf%e7%94%a8%e6%83%85%e5%86%b5\/\" target=\"_blank\" rel=\"noopener\" data-wpil-monitor-id=\"5613\">\u83b7\u53d6\u6709\u5173\u64cd\u4f5c\u7684\u4fe1\u606f<\/a> Linux \u53d1\u884c\u7248\u7684\u5185\u90e8\u7ed3\u6784\u975e\u5e38\u6709\u4ef7\u503c\uff0c\u65e0\u8bba\u662f\u5bf9\u4e8e\u65e5\u5e38\u7ba1\u7406\u8fd8\u662f\u6545\u969c\u6392\u9664\u548c\u8bca\u65ad\u95ee\u9898\u3002 systemctl \u547d\u4ee4\u4e0d\u662f\u4e00\u4e2a\u5355\u4e00\u7684\u5de5\u5177\u3002\u5b83\u66f4\u50cf\u662f\u4e00\u4e2a\u4e13\u95e8\u7684\u5de5\u5177\u7bb1\uff0c\u503c\u5f97\u719f\u6089\u3002 \ud83d\udd27\ud83d\udee0\ufe0f<\/p>","protected":false},"excerpt":{"rendered":"<p>systemctl \u89e3\u9501 Linux \u4e2d\u7684\u5b8c\u5168\u63a7\u5236\u6743\uff1a12 \u4e2a\u57fa\u672c\u547d\u4ee4\uff0c\u53ef\u5728\u51e0\u79d2\u949f\u5185\u7ba1\u7406\u670d\u52a1\uff01 \u26a1\ud83d\udcbb<\/p>","protected":false},"author":1,"featured_media":45967,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ai_generated_summary":"","iawp_total_views":33,"jnews-multi-image_gallery":[],"jnews_single_post":[],"jnews_primary_category":[],"jnews_social_meta":[],"jnews_review":[],"enable_review":"","type":"","name":"","summary":"","brand":"","sku":"","good":[],"bad":[],"score_override":"","override_value":"","rating":[],"price":[],"jnews_override_counter":[],"footnotes":""},"categories":[1435],"tags":[1445,1821,1558],"class_list":["post-27433","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutoriales","tag-evergreencontent","tag-linux","tag-techtips"],"_links":{"self":[{"href":"https:\/\/mastertrend.info\/zh\/wp-json\/wp\/v2\/posts\/27433","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mastertrend.info\/zh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mastertrend.info\/zh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mastertrend.info\/zh\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mastertrend.info\/zh\/wp-json\/wp\/v2\/comments?post=27433"}],"version-history":[{"count":0,"href":"https:\/\/mastertrend.info\/zh\/wp-json\/wp\/v2\/posts\/27433\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mastertrend.info\/zh\/wp-json\/wp\/v2\/media\/45967"}],"wp:attachment":[{"href":"https:\/\/mastertrend.info\/zh\/wp-json\/wp\/v2\/media?parent=27433"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mastertrend.info\/zh\/wp-json\/wp\/v2\/categories?post=27433"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mastertrend.info\/zh\/wp-json\/wp\/v2\/tags?post=27433"}],"curies":[{"name":"\u53ef\u6e7f\u6027\u7c89\u5242","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}