Jenkins runs as a background service on Linux. This guide lists the commands to control it and what to check when it does not start. It applies to Ubuntu, Debian, CentOS, Red Hat and Amazon Linux installs from the official packages.
Check the status
sudo systemctl status jenkins
Look for active (running) in green. failed or inactive means the service is down.
Start, stop and restart
sudo systemctl start jenkins sudo systemctl stop jenkins sudo systemctl restart jenkins
Use restart after changing the Jenkins configuration or installing a plugin that needs one. Jenkins can take up to a minute to answer after starting.
Start automatically on boot
sudo systemctl enable jenkins sudo systemctl disable jenkins
Older systems that use SysV init
Systems without systemd use the older service command with the same actions:
sudo service jenkins status sudo service jenkins start sudo service jenkins stop sudo service jenkins restart
Open Jenkins in the browser
By default Jenkins listens on port 8080, so visit http://your-server-ip:8080. Open the port in your firewall or cloud security group if the page does not load. On a first install, read the initial admin password with:
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
When it will not start
- Read the log.
sudo journalctl -u jenkins -n 100 --no-pagershows the last 100 lines, and/var/log/jenkins/jenkins.loghas more. - Java is missing or the wrong version. Run
java -version, and install the Java version your Jenkins release requires. - Port 8080 is taken. Run
sudo lsof -i :8080, stop the other program or change the Jenkins port. - Permissions. The
jenkinsuser must own/var/lib/jenkins. Fix it withsudo chown -R jenkins:jenkins /var/lib/jenkins. - Not enough memory. Small servers can run out of RAM. Check with
free -hand consider adding swap.
Restart safely from the web UI
If Jenkins is running, you can also open /safeRestart in the browser. It waits for running builds to finish before restarting, which is safer than restarting the service in the middle of a build.
Covering financial markets, commodity rates, and practical technology insights for India. Researched and fact-checked in accordance with our Editorial Policy.
Related & Trending Stories
Recommended based on your reading interest

