nugawiki

./categories/os

Ubuntu 부팅 시 스크립트 실행

업데이트 2026-07-21 조회수

1. crontab @reboot

vi scripts.sh
# #!/bin/bash
chmod +x scripts.sh
crontab -e
# @reboot /full/path/scripts.sh > /full/path/scripts.sh.log 2>&1

2. /etc/init.d + update-rc.d

cd /etc/init.d
sudo vi scripts.sh
sudo update-rc.d scripts.sh defaults
reboot

./comments