{"id":18619,"date":"2025-04-19T01:03:13","date_gmt":"2025-04-18T17:03:13","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/18619.html"},"modified":"2025-04-19T01:03:13","modified_gmt":"2025-04-18T17:03:13","slug":"%e3%80%90ubuntu%e3%80%91%e5%9c%a8-ubuntu-%e7%b3%bb%e7%bb%9f%e4%b8%ad%ef%bc%8c%e6%9f%a5%e7%9c%8b%e5%90%af%e5%8a%a8%e9%a1%b9","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/18619.html","title":{"rendered":"\u3010ubuntu\u3011\u5728 Ubuntu \u7cfb\u7edf\u4e2d\uff0c\u67e5\u770b\u542f\u52a8\u9879"},"content":{"rendered":"<h2>\u5728 Ubuntu \u7cfb\u7edf\u4e2d&#xff0c;\u67e5\u770b\u542f\u52a8\u9879<\/h2>\n<p>&#096;\u51e0\u79cd\u67e5\u770b\u542f\u52a8\u9879\u7684\u65b9\u6cd5<\/p>\n<h3>1. \u4f7f\u7528 systemctl \u67e5\u770b\u670d\u52a1<\/h3>\n<p>systemctl \u662f\u4e00\u4e2a\u7528\u4e8e\u7ba1\u7406\u548c\u67e5\u770b\u7cfb\u7edf\u670d\u52a1\u7684\u5de5\u5177\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528\u5b83\u6765\u67e5\u770b\u6240\u6709\u542f\u7528\u7684\u670d\u52a1\u3002<\/p>\n<ul>\n<li>\u67e5\u770b\u6240\u6709\u542f\u7528\u7684\u670d\u52a1<\/li>\n<\/ul>\n<p>systemctl list-unit-files &#8211;type&#061;service &#8211;state&#061;enabled<\/p>\n<p>\u8fd9\u5c06\u5217\u51fa\u6240\u6709\u542f\u7528\u7684\u670d\u52a1\u53ca\u5176\u5f53\u524d\u72b6\u6001&#xff08;\u5982\u542f\u7528\u3001\u7981\u7528&#xff09;\u3002<\/p>\n<ul>\n<li>\u67e5\u770b\u6b63\u5728\u8fd0\u884c\u7684\u670d\u52a1<\/li>\n<\/ul>\n<p>systemctl list-units &#8211;type&#061;service &#8211;state&#061;running<\/p>\n<p>\u8fd9\u5c06\u5217\u51fa\u5f53\u524d\u6b63\u5728\u8fd0\u884c\u7684\u670d\u52a1\u3002<\/p>\n<h3>2. \u4f7f\u7528 ls \/etc\/init.d\/ \u67e5\u770b\u4f20\u7edf\u7684 SysV \u542f\u52a8\u811a\u672c<\/h3>\n<p>\u5728\u67d0\u4e9b\u65e7\u7248\u672c\u7684 Ubuntu \u6216\u8005\u8fd0\u884c\u4e86\u517c\u5bb9 SysV \u542f\u52a8\u7684\u7cfb\u7edf&#xff0c;\u4f60\u53ef\u4ee5\u67e5\u770b \/etc\/init.d\/ \u76ee\u5f55\u4e2d\u7684\u542f\u52a8\u811a\u672c\u3002<\/p>\n<p>ls \/etc\/init.d\/<\/p>\n<p>\u8fd9\u5c06\u5217\u51fa\u6240\u6709\u5728\u4f20\u7edf SysV \u542f\u52a8\u65b9\u5f0f\u4e0b\u7684\u542f\u52a8\u811a\u672c\u3002<\/p>\n<h3>3. \u4f7f\u7528 update-rc.d \u67e5\u770b\u542f\u52a8\u811a\u672c\u7684\u914d\u7f6e<\/h3>\n<p>update-rc.d \u662f\u4e00\u4e2a\u7528\u4e8e\u7ba1\u7406 SysV \u542f\u52a8\u811a\u672c\u7684\u5de5\u5177\u3002<\/p>\n<ul>\n<li>\u67e5\u770b\u6240\u6709\u542f\u7528\u7684\u670d\u52a1<\/li>\n<\/ul>\n<p>sudo update-rc.d -f list<\/p>\n<p>\u8fd9\u5c06\u663e\u793a\u6240\u6709\u914d\u7f6e\u7684\u542f\u52a8\u811a\u672c\u53ca\u5176\u8fd0\u884c\u7ea7\u522b\u3002<\/p>\n<h3>4. \u4f7f\u7528 crontab \u67e5\u770b\u5b9a\u65f6\u4efb\u52a1<\/h3>\n<p>\u6709\u65f6&#xff0c;\u67d0\u4e9b\u542f\u52a8\u9879\u53ef\u80fd\u662f\u901a\u8fc7\u5b9a\u65f6\u4efb\u52a1 (cron) \u8bbe\u7f6e\u7684\u3002\u4f60\u53ef\u4ee5\u67e5\u770b\u5b9a\u65f6\u4efb\u52a1\u6765\u627e\u5230\u8fd9\u4e9b\u542f\u52a8\u9879\u3002<\/p>\n<ul>\n<li>\u67e5\u770b\u5f53\u524d\u7528\u6237\u7684\u5b9a\u65f6\u4efb\u52a1<\/li>\n<\/ul>\n<p>crontab -l<\/p>\n<ul>\n<li>\u67e5\u770b\u7cfb\u7edf\u8303\u56f4\u7684\u5b9a\u65f6\u4efb\u52a1<\/li>\n<\/ul>\n<p>sudo cat \/etc\/crontab<br \/>\nsudo ls \/etc\/cron.d\/<\/p>\n<h3>5. \u4f7f\u7528 gnome-session-properties \u67e5\u770b\u56fe\u5f62\u7528\u6237\u754c\u9762\u7684\u542f\u52a8\u5e94\u7528<\/h3>\n<p>\u5982\u679c\u4f60\u4f7f\u7528\u7684\u662f GNOME \u684c\u9762\u73af\u5883&#xff0c;\u4f60\u53ef\u4ee5\u4f7f\u7528\u56fe\u5f62\u5de5\u5177\u6765\u7ba1\u7406\u542f\u52a8\u5e94\u7528\u3002<\/p>\n<ul>\n<li>\u6253\u5f00\u542f\u52a8\u5e94\u7528\u7a0b\u5e8f<\/li>\n<\/ul>\n<p>gnome-session-properties<\/p>\n<p>\u8fd9\u5c06\u6253\u5f00\u4e00\u4e2a\u56fe\u5f62\u754c\u9762&#xff0c;\u663e\u793a\u6240\u6709\u5728 GNOME \u542f\u52a8\u65f6\u81ea\u52a8\u8fd0\u884c\u7684\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n<h3>6. \u67e5\u770b ~\/.config\/autostart\/ \u4e2d\u7684\u542f\u52a8\u5e94\u7528<\/h3>\n<p>\u5728\u73b0\u4ee3\u684c\u9762\u73af\u5883\u4e2d&#xff0c;\u542f\u52a8\u5e94\u7528\u7684\u914d\u7f6e\u901a\u5e38\u4f4d\u4e8e ~\/.config\/autostart\/ \u76ee\u5f55\u4e2d\u3002\u4f60\u53ef\u4ee5\u67e5\u770b\u8be5\u76ee\u5f55\u4ee5\u4e86\u89e3\u54ea\u4e9b\u5e94\u7528\u7a0b\u5e8f\u88ab\u914d\u7f6e\u4e3a\u5728\u7528\u6237\u767b\u5f55\u65f6\u542f\u52a8\u3002<\/p>\n<p>ls ~\/.config\/autostart\/<\/p>\n<h3>\u5c0f\u7ed3<\/h3>\n<ul>\n<li>\u4f7f\u7528 systemctl \u6765\u67e5\u770b\u548c\u7ba1\u7406\u7cfb\u7edf\u670d\u52a1\u3002<\/li>\n<li>ls \/etc\/init.d\/ \u548c update-rc.d \u9002\u7528\u4e8e\u4f20\u7edf\u7684 SysV \u542f\u52a8\u9879\u3002<\/li>\n<li>crontab \u7528\u4e8e\u67e5\u770b\u5b9a\u65f6\u4efb\u52a1\u3002<\/li>\n<li>gnome-session-properties \u63d0\u4f9b\u4e86\u4e00\u4e2a\u56fe\u5f62\u5316\u7684\u7ba1\u7406\u5de5\u5177\u3002<\/li>\n<li>~\/.config\/autostart\/ \u76ee\u5f55\u7528\u4e8e\u68c0\u67e5\u7528\u6237\u7ea7\u7684\u542f\u52a8\u5e94\u7528\u3002<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb2.4k\u6b21\uff0c\u70b9\u8d5e4\u6b21\uff0c\u6536\u85cf15\u6b21\u3002\u51e0\u79cd\u67e5\u770b\u542f\u52a8\u9879\u7684\u65b9\u6cd5\u3002_ubuntu\u67e5\u770b\u5f00\u673a\u542f\u52a8\u9879<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[103,43],"topic":[],"class_list":["post-18619","post","type-post","status-publish","format-standard","hentry","category-server","tag-ubuntu","tag-43"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u3010ubuntu\u3011\u5728 Ubuntu \u7cfb\u7edf\u4e2d\uff0c\u67e5\u770b\u542f\u52a8\u9879 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/18619.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010ubuntu\u3011\u5728 Ubuntu \u7cfb\u7edf\u4e2d\uff0c\u67e5\u770b\u542f\u52a8\u9879 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb2.4k\u6b21\uff0c\u70b9\u8d5e4\u6b21\uff0c\u6536\u85cf15\u6b21\u3002\u51e0\u79cd\u67e5\u770b\u542f\u52a8\u9879\u7684\u65b9\u6cd5\u3002_ubuntu\u67e5\u770b\u5f00\u673a\u542f\u52a8\u9879\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/18619.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-18T17:03:13+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/18619.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/18619.html\",\"name\":\"\u3010ubuntu\u3011\u5728 Ubuntu \u7cfb\u7edf\u4e2d\uff0c\u67e5\u770b\u542f\u52a8\u9879 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-18T17:03:13+00:00\",\"dateModified\":\"2025-04-18T17:03:13+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/18619.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/18619.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/18619.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010ubuntu\u3011\u5728 Ubuntu \u7cfb\u7edf\u4e2d\uff0c\u67e5\u770b\u542f\u52a8\u9879\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u3010ubuntu\u3011\u5728 Ubuntu \u7cfb\u7edf\u4e2d\uff0c\u67e5\u770b\u542f\u52a8\u9879 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/18619.html","og_locale":"zh_CN","og_type":"article","og_title":"\u3010ubuntu\u3011\u5728 Ubuntu \u7cfb\u7edf\u4e2d\uff0c\u67e5\u770b\u542f\u52a8\u9879 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb2.4k\u6b21\uff0c\u70b9\u8d5e4\u6b21\uff0c\u6536\u85cf15\u6b21\u3002\u51e0\u79cd\u67e5\u770b\u542f\u52a8\u9879\u7684\u65b9\u6cd5\u3002_ubuntu\u67e5\u770b\u5f00\u673a\u542f\u52a8\u9879","og_url":"https:\/\/www.wsisp.com\/helps\/18619.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-18T17:03:13+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/18619.html","url":"https:\/\/www.wsisp.com\/helps\/18619.html","name":"\u3010ubuntu\u3011\u5728 Ubuntu \u7cfb\u7edf\u4e2d\uff0c\u67e5\u770b\u542f\u52a8\u9879 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-18T17:03:13+00:00","dateModified":"2025-04-18T17:03:13+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/18619.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/18619.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/18619.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u3010ubuntu\u3011\u5728 Ubuntu \u7cfb\u7edf\u4e2d\uff0c\u67e5\u770b\u542f\u52a8\u9879"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/18619","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=18619"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/18619\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=18619"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=18619"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=18619"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=18619"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}