I would like to run a sudo command when Ubuntu starts up (before anyone logs in):
sudo
sudo searchd
How would I do this?
You can add the command in the /etc/rc.local script that is executed at the end of startup.
/etc/rc.local
Write the command before exit 0. Anything written after exit 0 will never be executed.
exit 0
2.1m questions
2.1m answers
60 comments
57.0k users