Starting, stopping, and restarting Jenkins on Ubuntu

Jenkins by default starts running when installed. Here are the commands to start, stop, restart, and check the status of the Jenkins service:

  1. To start Jenkins, use the following command:
        sudo systemctl start jenkins 
  1. Similarly, to stop Jenkins, use the following command:
        sudo systemctl stop jenkins 
  1. To restart Jenkins, use the following command:
        sudo systemctl restart jenkins 
  1. To check the status of the Jenkins service, use the following systemctl command:
        sudo systemctl status jenkins 
  1. You should see the following output:
 ● jenkins.service - LSB: Start Jenkins at boot time Loaded: loaded (/etc/init.d/jenkins; bad; vendor preset: enabled) Active: active (exited) since Wed ...

Get Learning Continuous Integration with Jenkins - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.