Contents
What is the command to start a service in Linux?
I remember, back in the day, to start or stop a Linux service, I’d have to open a terminal window, change into the /etc/rc. d/ (or /etc/init. d, depending upon which distribution I was using), locate the service, and the issue the command /etc/rc.
How do I create a service in Ubuntu?
Run Your Java App as a Service on Ubuntu
- Step 1: Create a Service. sudo vim /etc/systemd/system/my-webapp.service. …
- Step 2: Create a Bash Script to Call Your Service. Here’s the bash script that calls your JAR file: my-webapp. …
- Step 3: Start the Service. sudo systemctl daemon-reload. …
- Step 4: Set Up Logging. First, run: sudo journalctl –unit=my-webapp .
20 окт. 2017 г.