How to add startup items in Ubuntu?
To add a startup item, you can follow these steps:
- Open the terminal and input the following command to edit the boot entry list:
sudo nano /etc/rc.local
- In the open file, you can add commands or scripts that need to be executed. For example, if you want to run a script file during startup, you can add the following content:
/path/to/your/script.sh
- After editing is complete, press Ctrl + X, then press the Y key to confirm saving, and finally press Enter to exit the editor.
- Finally, enter the following command to apply the changes:
sudo chmod +x /etc/rc.local
Now, your Ubuntu system will automatically run the startup items you have added during boot.