How to run a cmd at reboot on Ubuntu

Use the root crontab and add an @reboot  entry:

bash<br>sudo crontab -e<br>

Add a line like:

bash<br>@reboot sudo /usr/bin/node /home/ubuntu/.../server.mjs<br>

Sign In Name Sign Out