{"id":2537,"date":"2023-08-25T11:25:37","date_gmt":"2023-08-25T09:25:37","guid":{"rendered":"https:\/\/itsimple.info\/?p=2537"},"modified":"2023-08-25T11:25:39","modified_gmt":"2023-08-25T09:25:39","slug":"how-to-execute-command-during-startup-in-linux","status":"publish","type":"post","link":"https:\/\/itsimple.info\/?p=2537","title":{"rendered":"How To Execute Command During Startup in Linux"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>I will Show is two way to execute command. When the Linux operating system is booting, the first one is the simplest , just enter you command syntax to the file :<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/etc\/rc.d\/rc.local<\/pre>\n\n\n\n<p>First make this file executable bye adding permissions : <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">chmod +x \/etc\/rc.d\/rc.local<\/pre>\n\n\n\n<p>Then just add you line at the bottom of the file . If you are pointing to a script file do not forget to &#8220;chmod +x&#8221; this script file as well !<\/p>\n\n\n\n<p>The Second option is with cron job , <a rel=\"noreferrer noopener\" href=\"https:\/\/www.tecmint.com\/11-cron-scheduling-task-examples-in-linux\/\" target=\"_blank\">cron scheduler<\/a> also allows the use of <code>@reboot<\/code>. This directive, followed by the absolute path to the script, will cause it to run when the machine boots.<\/p>\n\n\n\n<figure class=\"wp-block-pullquote has-vivid-green-cyan-color has-text-color has-x-large-font-size\"><blockquote><p>Good Luck<\/p><\/blockquote><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>I will Show is two way to execute command. When the Linux operating system is booting, the first one is the simplest , just enter you command syntax to the file : \/etc\/rc.d\/rc.local First make this file executable bye adding permissions : chmod +x \/etc\/rc.d\/rc.local Then just add you line at the bottom of the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,13,12],"tags":[],"class_list":["post-2537","post","type-post","status-publish","format-standard","hentry","category-centos","category-linux","category-tutorials"],"_links":{"self":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts\/2537","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2537"}],"version-history":[{"count":0,"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts\/2537\/revisions"}],"wp:attachment":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2537"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2537"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2537"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}