# Running Scripts and Commands at Start-up Time on (Ubuntu) - Quick Examples and Reference

Last updated:

## commands to be run after startup ends

Add the code you want to run to /etc/rc.local.

• before the call to exit 0
• commands within are run as root

You need to add alias code to ~/.bashrc
alias rr='sudo /etc/init.d/apache2 restart'

Close your terminal and then open up a new one for changes to take effect and run rr.