Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

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
Comment

PREVIOUS NEXT
Code Example
Shell :: chocolatey local installed 
Shell :: linux check which app is using network 
Shell :: vieuw the MOTD linux 
Shell :: github checkout branch 
Shell :: add key file to ssh 
Shell :: npm -s flag 
Shell :: gitignore folder 
Shell :: command prompt flashes and closes 
Shell :: delete command from history 
Shell :: how to delay a script from running linx terminal 
Shell :: commands to download metasploit on linux 
Shell :: copy file permissions to another file 
Shell :: linux up one directory 
Shell :: bash store pipe output in variable 
Shell :: github to colab 
Shell :: how to delete all history for specific search term in chrome 
Shell :: why installing pandas take time in docker 
Shell :: git delete commit history 
Shell :: wsl2 ubuntu xfce 
Shell :: bash: rspec: command not found 
Shell :: git push empty directories 
Shell :: pretty git branch graph print 
Shell :: android studio git 
Shell :: material ui npm 
Shell :: watchman installation 
Shell :: pull remote branch git 
Shell :: github bullet points 
Shell :: push to docker hub 
Shell :: bash ls and pick 2nd column 
Shell :: kubectl download 
ADD CONTENT
Topic
Content
Source link
Name
4+1 =