Linux: file /etc/rc.local: Difference between revisions
From OnnoCenterWiki
Jump to navigationJump to search
Onnowpurbo (talk | contribs) Created page with "Di ubuntu baru tampaknya /etc/rc.local di buang .. ==Cek== Untuk mencek apakah /etc/rc.local akan di eksekusi sudo systemctl edit --full rc-local Akan keluar, antara lain..." |
Onnowpurbo (talk | contribs) No edit summary |
||
| Line 18: | Line 18: | ||
touch /etc/rc.local | touch /etc/rc.local | ||
chmod +x /etc/rc.local | chmod +x /etc/rc.local | ||
==Isi /etc/rc.local | |||
Isi dengan | |||
# script/program yang mau jalankan, contoh | |||
/usr/bin/python3 /home/onno/program.py & | |||
exit 0 | |||
Revision as of 21:45, 25 December 2020
Di ubuntu baru tampaknya /etc/rc.local di buang ..
Cek
Untuk mencek apakah /etc/rc.local akan di eksekusi
sudo systemctl edit --full rc-local
Akan keluar, antara lain
# This unit gets pulled automatically into multi-user.target by # systemd-rc-local-generator if /etc/rc.local is executable.
Artinya kalau ada /etc/rc.local akan di eksekusi kalau di ijinkan.
Buat /etc/rc.local
touch /etc/rc.local chmod +x /etc/rc.local
==Isi /etc/rc.local
Isi dengan
# script/program yang mau jalankan, contoh /usr/bin/python3 /home/onno/program.py & exit 0