{"id":2753,"date":"2019-02-16T19:25:36","date_gmt":"2019-02-16T11:25:36","guid":{"rendered":"http:\/\/www.liangliang.org.cn\/?p=2753"},"modified":"2019-02-16T19:25:37","modified_gmt":"2019-02-16T11:25:37","slug":"%e4%bf%ae%e6%94%b9debian%e9%bb%98%e8%ae%a4%e8%bf%90%e8%a1%8c%e7%ba%a7%e5%88%ab","status":"publish","type":"post","link":"https:\/\/www.liangliang.org.cn\/?p=2753","title":{"rendered":"\u4fee\u6539debian\u9ed8\u8ba4\u8fd0\u884c\u7ea7\u522b"},"content":{"rendered":"\n<p>\u4f17\u6240\u5468\u77e5debian9\u548cdebian8\u5df2\u7ecf\u7528systemd\u7684targets\u4ee3\u66ff\u4e86\u539f\u6709\u7684\/etc\/inittab\u6587\u4ef6\uff0c\u7528\u6237\u5df2\u65e0\u6cd5\u901a\u8fc7\u66f4\u6539\/etc\/inittab\u6765\u5b9e\u73b0\u66f4\u6539\u9ed8\u8ba4\u8fd0\u884c\u7ea7\u3002\u4fee\u6539\u9ed8\u8ba4\u684c\u9762\u53ef\u901a\u8fc7\u4f7f\u7528systemctl\u547d\u4ee4\u6216\u521b\u5efa\u4e00\u4e2a\u8fd0\u884c\u7ea7targets\u6587\u4ef6\u7684\u8f6f\u94fe\u63a5\u7684\u65b9\u5f0f\u6765\u5b9e\u73b0\u3002<br \/>\u00a0 \u00a0\u00a0\u00a0\u00a0 \u9996\u5148\u9700\u5207\u6362\u5230root\u7528\u6237\u4e0b\u3002<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 su -<\/p>\n<p>\u65b9\u6cd5\u4e00\uff1a\uff08\u901a\u8fc7\u547d\u4ee4\u6765\u5207\u6362\uff09<\/p>\n<div class=\"code-toolbar\">\n<pre class=\"brush:html;toolbar:false  language-html\"><code class=\"  language-html\">1.\u67e5\u770b\u5f53\u524d\u7684\u8fd0\u884c\u7ea7\n\n# systemctl get-default\ngraphical.target\n \n2.\u67e5\u770b\u53ef\u4f9b\u66ff\u6362\u7684\u8fd0\u884c\u7ea7\n\n# systemctl list-units --type=target\nUNIT                   LOAD   ACTIVE SUB    DESCRIPTION\nbasic.target           loaded active active Basic System\ncryptsetup.target      loaded active active Encrypted Volumes\ngetty.target           loaded active active Login Prompts\ngraphical.target       loaded active active Graphical Interface\nlocal-fs-pre.target    loaded active active Local File Systems (Pre)\nlocal-fs.target        loaded active active Local File Systems\nmulti-user.target      loaded active active Multi-User System\nnetwork-online.target  loaded active active Network is Online\nnetwork.target         loaded active active Network\nnss-user-lookup.target loaded active active User and Group Name Lookups\npaths.target           loaded active active Paths\nremote-fs.target       loaded active active Remote File Systems\nslices.target          loaded active active Slices\nsockets.target         loaded active active Sockets\nsound.target           loaded active active Sound Card\nswap.target            loaded active active Swap\nsysinit.target         loaded active active System Initialization\ntime-sync.target       loaded active active System Time Synchronized\ntimers.target          loaded active active Timers\n\nLOAD   = Reflects whether the unit definition was properly loaded.\nACTIVE = The high-level unit activation state, i.e. generalization of SUB.\nSUB    = The low-level unit activation state, values depend on unit type.\n\n3.\u66ff\u6362\u9ed8\u8ba4\u8fd0\u884c\u7ea7\n\n# systemctl set-default multi-user.target (\u66ff\u6362\u4e3a\u591a\u7528\u6237\u6587\u672c)\n\n\u65b9\u6cd5\u4e8c\uff08\u521b\u5efa\u8f6f\u94fe\u63a5\u6765\u66ff\u6362\uff09\n\n# ln -sf \/lib\/systemd\/system\/runlevel5.target \/lib\/systemd\/system\/default.target<\/code><\/pre>\n<\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-2753","post","type-post","status-publish","format-standard","hentry","category-debian"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=\/wp\/v2\/posts\/2753","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2753"}],"version-history":[{"count":1,"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=\/wp\/v2\/posts\/2753\/revisions"}],"predecessor-version":[{"id":2754,"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=\/wp\/v2\/posts\/2753\/revisions\/2754"}],"wp:attachment":[{"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2753"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2753"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2753"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}