{"id":309,"date":"2025-07-04T09:21:36","date_gmt":"2025-07-04T09:21:36","guid":{"rendered":"https:\/\/blog.chaiyakul.com\/?p=309"},"modified":"2025-07-04T09:21:36","modified_gmt":"2025-07-04T09:21:36","slug":"enable-disable-service-autorun-centos-9-reboot","status":"publish","type":"post","link":"https:\/\/blog.chaiyakul.com\/index.php\/2025\/07\/04\/enable-disable-service-autorun-centos-9-reboot\/","title":{"rendered":"\u0e14\u0e39 \/ \u0e1b\u0e34\u0e14 Service \u0e17\u0e35\u0e48\u0e15\u0e31\u0e49\u0e07\u0e43\u0e2b\u0e49\u0e23\u0e31\u0e19\u0e2d\u0e31\u0e15\u0e42\u0e19\u0e21\u0e31\u0e15\u0e34\u0e2b\u0e25\u0e31\u0e07\u0e1a\u0e39\u0e15\u0e43\u0e19 CentOS 9"},"content":{"rendered":"\n<p><u><strong>\u0e14\u0e39\u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14\u0e17\u0e35\u0e48 Enable \u0e2d\u0e22\u0e39\u0e48 (\u0e23\u0e31\u0e19\u0e2d\u0e31\u0e15\u0e42\u0e19\u0e21\u0e31\u0e15\u0e34)<\/strong><\/u><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsystemctl list-unit-files --type=service | grep enabled\n<\/pre><\/div>\n\n\n<p>\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e1c\u0e25\u0e25\u0e31\u0e1e\u0e18\u0e4c<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsshd.service              enabled\nfirewalld.service         enabled\nnetwork.service           enabled\ncrond.service             enabled\n<\/pre><\/div>\n\n\n<p>\u0e41\u0e2a\u0e14\u0e07\u0e27\u0e48\u0e32 Service \u0e40\u0e2b\u0e25\u0e48\u0e32\u0e19\u0e35\u0e49\u0e08\u0e30\u0e23\u0e31\u0e19\u0e17\u0e38\u0e01\u0e04\u0e23\u0e31\u0e49\u0e07\u0e2b\u0e25\u0e31\u0e07\u0e1a\u0e39\u0e15<\/p>\n\n\n\n<p>\u0e14\u0e39\u0e40\u0e09\u0e1e\u0e32\u0e30\u0e17\u0e35\u0e48\u0e01\u0e33\u0e25\u0e31\u0e07\u0e23\u0e31\u0e19\u0e2d\u0e22\u0e39\u0e48\u0e15\u0e2d\u0e19\u0e19\u0e35\u0e49 (Active)<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsystemctl list-units --type=service --state=running\n<\/pre><\/div>\n\n\n<p>\u0e14\u0e39\u0e2a\u0e16\u0e32\u0e19\u0e30\u0e40\u0e09\u0e1e\u0e32\u0e30 Service \u0e17\u0e35\u0e48\u0e2a\u0e19\u0e43\u0e08<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsystemctl status \u0e0a\u0e37\u0e48\u0e2d.service\n<\/pre><\/div>\n\n\n<p>\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsystemctl status sshd.service\n<\/pre><\/div>\n\n\n<p>\u0e14\u0e39\u0e17\u0e38\u0e01 Target \u0e27\u0e48\u0e32\u0e21\u0e35\u0e2d\u0e30\u0e44\u0e23 Enable \u0e44\u0e27\u0e49\u0e1a\u0e49\u0e32\u0e07 (\u0e02\u0e31\u0e49\u0e19\u0e2a\u0e39\u0e07)<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsystemctl list-dependencies multi-user.target\n<\/pre><\/div>\n\n\n<p>\u0e2a\u0e23\u0e38\u0e1b\u0e17\u0e35\u0e48\u0e19\u0e34\u0e22\u0e21\u0e43\u0e0a\u0e49<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>systemctl list-unit-files --type=service | grep enabled<\/code> \u2794 \u0e14\u0e39\u0e27\u0e48\u0e32\u0e21\u0e35 Service \u0e2d\u0e30\u0e44\u0e23\u0e15\u0e31\u0e49\u0e07 Autostart \u0e1a\u0e49\u0e32\u0e07<\/li>\n\n\n\n<li><code>systemctl list-units --type=service --state=running<\/code> \u2794 \u0e14\u0e39 Service \u0e17\u0e35\u0e48\u0e01\u0e33\u0e25\u0e31\u0e07\u0e17\u0e33\u0e07\u0e32\u0e19\u0e15\u0e2d\u0e19\u0e19\u0e35\u0e49<\/li>\n<\/ul>\n\n\n\n<p><strong>\u0e04\u0e33\u0e2a\u0e31\u0e48\u0e07\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a \u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e17\u0e33\u0e07\u0e32\u0e19 \u0e41\u0e25\u0e30 \u0e44\u0e21\u0e48\u0e43\u0e2b\u0e49\u0e23\u0e31\u0e19\u0e2d\u0e31\u0e15\u0e42\u0e19\u0e21\u0e31\u0e15\u0e34 \u0e02\u0e2d\u0e07 <code>service<\/code> \u0e21\u0e35\u0e14\u0e31\u0e07\u0e19\u0e35\u0e49\u0e04\u0e23\u0e31\u0e1a:<\/strong><\/p>\n\n\n\n<p>\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07 : \u0e04\u0e33\u0e2a\u0e31\u0e48\u0e07\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a <strong>\u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e17\u0e33\u0e07\u0e32\u0e19<\/strong> \u0e41\u0e25\u0e30 <strong>\u0e44\u0e21\u0e48\u0e43\u0e2b\u0e49\u0e23\u0e31\u0e19\u0e2d\u0e31\u0e15\u0e42\u0e19\u0e21\u0e31\u0e15\u0e34<\/strong> \u0e02\u0e2d\u0e07 <code>vstarcam-home411car.service<\/code> \u0e21\u0e35\u0e14\u0e31\u0e07\u0e19\u0e35\u0e49\u0e04\u0e23\u0e31\u0e1a:<\/p>\n\n\n\n<p>1.\u0e2b\u0e22\u0e38\u0e14\u0e01\u0e32\u0e23\u0e17\u0e33\u0e07\u0e32\u0e19\u0e17\u0e31\u0e19\u0e17\u0e35<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo systemctl stop vstarcam-home411car.service\n<\/pre><\/div>\n\n\n<p>2.\u0e22\u0e01\u0e40\u0e25\u0e34\u0e01\u0e44\u0e21\u0e48\u0e43\u0e2b\u0e49\u0e23\u0e31\u0e19\u0e2d\u0e31\u0e15\u0e42\u0e19\u0e21\u0e31\u0e15\u0e34\u0e2b\u0e25\u0e31\u0e07\u0e1a\u0e39\u0e15<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo systemctl disable vstarcam-home411car.service\n<\/pre><\/div>\n\n\n<p>3.\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e2a\u0e16\u0e32\u0e19\u0e30<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsystemctl status vstarcam-home411car.service\n<\/pre><\/div>\n\n\n<p>\u0e16\u0e49\u0e32 <strong>Inactive (dead)<\/strong> \u0e2b\u0e23\u0e37\u0e2d <strong>Disabled<\/strong> \u0e16\u0e37\u0e2d\u0e27\u0e48\u0e32\u0e17\u0e33\u0e16\u0e39\u0e01\u0e15\u0e49\u0e2d\u0e07<\/p>\n\n\n\n<p>\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e40\u0e15\u0e34\u0e21 (\u0e01\u0e23\u0e13\u0e35\u0e44\u0e21\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e43\u0e2b\u0e49\u0e04\u0e19\u0e2d\u0e37\u0e48\u0e19\u0e40\u0e1c\u0e25\u0e2d\u0e40\u0e1b\u0e34\u0e14)<\/p>\n\n\n\n<p>\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16 <code>mask<\/code> \u0e44\u0e14\u0e49 \u0e08\u0e30\u0e17\u0e33\u0e43\u0e2b\u0e49\u0e40\u0e1b\u0e34\u0e14\u0e44\u0e21\u0e48\u0e44\u0e14\u0e49\u0e40\u0e25\u0e22\u0e08\u0e19\u0e01\u0e27\u0e48\u0e32\u0e08\u0e30 <code>unmask<\/code><\/p>\n\n\n\n<p>\u0e25\u0e47\u0e2d\u0e01\u0e44\u0e21\u0e48\u0e43\u0e2b\u0e49\u0e40\u0e1b\u0e34\u0e14 (\u0e15\u0e31\u0e27\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e40\u0e2a\u0e23\u0e34\u0e21)<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo systemctl mask vstarcam-home411car.service\n<\/pre><\/div>\n\n\n<p>\u0e1b\u0e25\u0e14\u0e25\u0e47\u0e2d\u0e01\u0e2b\u0e32\u0e01\u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e43\u0e08<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo systemctl unmask vstarcam-home411car.service\n<\/pre><\/div>\n\n\n<p>\u0e2a\u0e23\u0e38\u0e1b\u0e17\u0e31\u0e48\u0e27\u0e44\u0e1b\u0e17\u0e35\u0e48\u0e43\u0e0a\u0e49<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo systemctl stop vstarcam-home411car.service\nsudo systemctl disable vstarcam-home411car.service\n<\/pre><\/div>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0e14\u0e39\u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14\u0e17\u0e35\u0e48 Enable \u0e2d\u0e22\u0e39\u0e48 (\u0e23\u0e31\u0e19\u0e2d\u0e31\u0e15\u0e42\u0e19\u0e21\u0e31\u0e15\u0e34) \u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e1c\u0e25\u0e25\u0e31\u0e1e\u0e18\u0e4c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_editorskit_title_hidden":false,"_editorskit_reading_time":0,"_editorskit_is_block_options_detached":false,"_editorskit_block_options_position":"{}","footnotes":""},"categories":[105,9,160],"tags":[],"class_list":["post-309","post","type-post","status-publish","format-standard","hentry","category-centos","category-linux","category-service"],"_links":{"self":[{"href":"https:\/\/blog.chaiyakul.com\/index.php\/wp-json\/wp\/v2\/posts\/309","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.chaiyakul.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.chaiyakul.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.chaiyakul.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.chaiyakul.com\/index.php\/wp-json\/wp\/v2\/comments?post=309"}],"version-history":[{"count":1,"href":"https:\/\/blog.chaiyakul.com\/index.php\/wp-json\/wp\/v2\/posts\/309\/revisions"}],"predecessor-version":[{"id":310,"href":"https:\/\/blog.chaiyakul.com\/index.php\/wp-json\/wp\/v2\/posts\/309\/revisions\/310"}],"wp:attachment":[{"href":"https:\/\/blog.chaiyakul.com\/index.php\/wp-json\/wp\/v2\/media?parent=309"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.chaiyakul.com\/index.php\/wp-json\/wp\/v2\/categories?post=309"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.chaiyakul.com\/index.php\/wp-json\/wp\/v2\/tags?post=309"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}