
起動後に簡単なコマンドを実行したい。
cd /mypath
# then
./mycommand
どうすればいいですか?
答え1
2つの解決策:
1 つ目は、コマンドのフルパスを次のように入力することです/etc/rc.local
。
/mypath/mycommand
または、cron 方式:
crontab -e
@reboot cd /mypath;./mycommand
crontab マニュアルより:
@reboot Run once, at startup.