Answers for "ubuntu add program startup app"

3

ubuntu startup script

add the command to /home/$USER/.bashrc
Posted by: Guest on September-26-2021
0

start scipt at startup ubuntu

Create a systemd unit file with .service extension in /etc/systemd/system, 
for example creating:

sudo nano /etc/systemd/system/my-service.service

, with the following content:


[Unit]
Description=My custom startup script

[Service]
ExecStart=/home/user/startup.sh start

[Install]
WantedBy=multi-user.target


You can now start/stop this service with:

sudo systemctl start my-service / sudo systemctl stop my-service

To enable this service when startup, run:

sudo systemctl enable my-service

To disable this service when startup, run:

sudo systemctl disable my-service
Posted by: Guest on February-04-2022

Code answers related to "ubuntu add program startup app"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language