- Blog Categories
- Project Management
- Agile Management
- IT Service Management
- Cloud Computing
- Business Management
- Business Intelligence
- Quality Engineer
- Cyber Security
- Career
- Big Data
- Programming
- Most Popular Blogs
- PMP Exam Schedule for 2024: Check PMP Exam Date
- Top 60+ PMP Exam Questions and Answers for 2024
- PMP Cheat Sheet and PMP Formulas To Use in 2024
- What is PMP Process? A Complete List of 49 Processes of PMP
- Top 15+ Project Management Case Studies with Examples 2024
- Top Picks by Authors
- Top 170 Project Management Research Topics
- What is Effective Communication: Definition
- How to Create a Project Plan in Excel in 2024?
- PMP Certification Exam Eligibility in 2024 [A Complete Checklist]
- PMP Certification Fees - All Aspects of PMP Certification Fee
- Most Popular Blogs
- CSM vs PSM: Which Certification to Choose in 2024?
- How Much Does Scrum Master Certification Cost in 2024?
- CSPO vs PSPO Certification: What to Choose in 2024?
- 8 Best Scrum Master Certifications to Pursue in 2024
- Safe Agilist Exam: A Complete Study Guide 2024
- Top Picks by Authors
- SAFe vs Agile: Difference Between Scaled Agile and Agile
- Top 21 Scrum Best Practices for Efficient Agile Workflow
- 30 User Story Examples and Templates to Use in 2024
- State of Agile: Things You Need to Know
- Top 24 Career Benefits of a Certifed Scrum Master
- Most Popular Blogs
- ITIL Certification Cost in 2024 [Exam Fee & Other Expenses]
- Top 17 Required Skills for System Administrator in 2024
- How Effective Is Itil Certification for a Job Switch?
- IT Service Management (ITSM) Role and Responsibilities
- Top 25 Service Based Companies in India in 2024
- Top Picks by Authors
- What is Escalation Matrix & How Does It Work? [Types, Process]
- ITIL Service Operation: Phases, Functions, Best Practices
- 10 Best Facility Management Software in 2024
- What is Service Request Management in ITIL? Example, Steps, Tips
- An Introduction To ITIL® Exam
- Most Popular Blogs
- A Complete AWS Cheat Sheet: Important Topics Covered
- Top AWS Solution Architect Projects in 2024
- 15 Best Azure Certifications 2024: Which one to Choose?
- Top 22 Cloud Computing Project Ideas in 2024 [Source Code]
- How to Become an Azure Data Engineer? 2024 Roadmap
- Top Picks by Authors
- Top 40 IoT Project Ideas and Topics in 2024 [Source Code]
- The Future of AWS: Top Trends & Predictions in 2024
- AWS Solutions Architect vs AWS Developer [Key Differences]
- Top 20 Azure Data Engineering Projects in 2024 [Source Code]
- 25 Best Cloud Computing Tools in 2024
- Most Popular Blogs
- Company Analysis Report: Examples, Templates, Components
- 400 Trending Business Management Research Topics
- Business Analysis Body of Knowledge (BABOK): Guide
- ECBA Certification: Is it Worth it?
- How to Become Business Analyst in 2024? Step-by-Step
- Top Picks by Authors
- Top 20 Business Analytics Project in 2024 [With Source Code]
- ECBA Certification Cost Across Countries
- Top 9 Free Business Requirements Document (BRD) Templates
- Business Analyst Job Description in 2024 [Key Responsibility]
- Business Analysis Framework: Elements, Process, Techniques
- Most Popular Blogs
- Best Career options after BA [2024]
- Top Career Options after BCom to Know in 2024
- Top 10 Power Bi Books of 2024 [Beginners to Experienced]
- Power BI Skills in Demand: How to Stand Out in the Job Market
- Top 15 Power BI Project Ideas
- Top Picks by Authors
- 10 Limitations of Power BI: You Must Know in 2024
- Top 45 Career Options After BBA in 2024 [With Salary]
- Top Power BI Dashboard Templates of 2024
- What is Power BI Used For - Practical Applications Of Power BI
- SSRS Vs Power BI - What are the Key Differences?
- Most Popular Blogs
- Data Collection Plan For Six Sigma: How to Create One?
- Quality Engineer Resume for 2024 [Examples + Tips]
- 20 Best Quality Management Certifications That Pay Well in 2024
- Six Sigma in Operations Management [A Brief Introduction]
- Top Picks by Authors
- Six Sigma Green Belt vs PMP: What's the Difference
- Quality Management: Definition, Importance, Components
- Adding Green Belt Certifications to Your Resume
- Six Sigma Green Belt in Healthcare: Concepts, Benefits and Examples
- Most Popular Blogs
- Latest CISSP Exam Dumps of 2024 [Free CISSP Dumps]
- CISSP vs Security+ Certifications: Which is Best in 2024?
- Best CISSP Study Guides for 2024 + CISSP Study Plan
- How to Become an Ethical Hacker in 2024?
- Top Picks by Authors
- CISSP vs Master's Degree: Which One to Choose in 2024?
- CISSP Endorsement Process: Requirements & Example
- OSCP vs CISSP | Top Cybersecurity Certifications
- How to Pass the CISSP Exam on Your 1st Attempt in 2024?
- Most Popular Blogs
- Best Career options after BA [2024]
- Top Picks by Authors
- Top Career Options & Courses After 12th Commerce in 2024
- Recommended Blogs
- 30 Best Answers for Your 'Reason for Job Change' in 2024
- Recommended Blogs
- Time Management Skills: How it Affects your Career
- Most Popular Blogs
- Top 28 Big Data Companies to Know in 2024
- Top Picks by Authors
- Top Big Data Tools You Need to Know in 2024
- Most Popular Blogs
- Web Development Using PHP And MySQL
- Top Picks by Authors
- Top 30 Software Engineering Projects in 2024 [Source Code]
- More
- Tutorials
- Practise Tests
- Interview Questions
- Free Courses
- Agile & PMP Practice Tests
- Agile Testing
- Agile Scrum Practice Exam
- CAPM Practice Test
- PRINCE2 Foundation Exam
- PMP Practice Exam
- Cloud Related Practice Test
- Azure Infrastructure Solutions
- AWS Solutions Architect
- AWS Developer Associate
- IT Related Pratice Test
- ITIL Practice Test
- Devops Practice Test
- TOGAF® Practice Test
- Other Practice Test
- Oracle Primavera P6 V8
- MS Project Practice Test
- Project Management & Agile
- Project Management Interview Questions
- Release Train Engineer Interview Questions
- Agile Coach Interview Questions
- Scrum Interview Questions
- IT Project Manager Interview Questions
- Cloud & Data
- Azure Databricks Interview Questions
- AWS architect Interview Questions
- Cloud Computing Interview Questions
- AWS Interview Questions
- Kubernetes Interview Questions
- Web Development
- CSS3 Free Course with Certificates
- Basics of Spring Core and MVC
- Javascript Free Course with Certificate
- React Free Course with Certificate
- Node JS Free Certification Course
- Data Science
- Python Machine Learning Course
- Python for Data Science Free Course
- NLP Free Course with Certificate
- Data Analysis Using SQL
How to Restart Jenkins in Linux, Windows, Mac? [4 Methods]
Updated on Oct 21, 2022 | 10 min read | 24.1k views
Share:
Table of Contents
While working on Jenkins, there might be instances when you need to go for Jenkins restart. Right from troubleshooting an error to installing some new Jenkins plugin, there can be various reasons why you need to restart it. However, if you are starting your days with Jenkins and do not have a complete overview of the methods you need to use to restart Jenkins manually, I have got you covered. This article comprises Jenkins tutorial to aid you in learning about ways for safe restarting Jenkins. If you want to know more about how to restart Jenkins and its different functionalities, you must check out some Jenkins course online.
Different Ways to Restart Jenkins
As I mentioned earlier, there are multiple ways to restart Jenkins. You can use the URL bar, a safe restart plugin or use the Manage Jenkins tab available on the UI to restart Jenkins on your computer.
We can segregate Jenkins restart into two different categories. The first one is to restart safely, and another way is to force restart. When you use a restart command directly on the URL, Jenkins restarts instantly without completing the build that is processing. In comparison, safe restarting allows Jenkins to complete the running builds and prepare them for the restart.
Users can safely restart Jenkins through the Safe Restart plugin and Manage Jenkins.
Using Manage Jenkins

One can shut down and restart Jenkins using Manage Jenkins. The option to 'safe shutdown' Jenkins is available in the Tools and action section under the Manage Jenkins option. It allows you to shut down Jenkins modules safely. Using the option, Jenkins stops processing any new build and prepares for the shutdown.
- Follow the steps below to understand the process completely.
- First login to Jenkins
- Then, select the 'Manage Jenkins' option from the left-hand side menu.
- Now, scroll down and click on the 'Prepare for Shutdown' tab under 'Tools and Shutdown.'
Note: As you click the Prepare for Shutdown button, Jenkins will wait for the execution of the builds that are running and stop executing any new build. After clicking the Prepare for Shutdown button, you will be redirected to the Jenkins dashboard. Also, you will be shown a notification like the below image.
How to Restart Jenkins Manually?
1. Restart Jenkins via URL
Are you accessing the Jenkins dashboard from a web browser? If yes, then you can restart Jenkins manually directly from the URL. Use the following command on the URL to force restart Jenkins. It will stop Jenkins from executing any build that is running and restarts right at the time.
[Jenkins URL]/restart
Now, if you want to safely restart Jenkins, which means allowing Jenkins to execute all the builds that are running the command is a bit different. Use the below command to restart Jenkins from the URL safely:
[Jenkins URL]/safeRestart
After executing any of the commands, you will be redirected to the dashboard and a notification window asking for confirmation. Click the Yes button to complete the restart.
The port on which Jenkins is running on your system and the hostname are available on the Jenkins URL. The default port for Jenkins to run is '8080'.
If you are logging in to Jenkins from your system, then you can use the following command on the URL bar:
http://localhost:8080/restart
http://localhost:8080/safeRestart
However, if you are logging in from another system, then use these commands to restart Jenkins manually:
http://[your system's hostname]:8080/restart
http://[your system's hostname]:8080/safeRestart
2. Restart Jenkins via Safe Restart Plugin
As we mentioned earlier, you can safely restart Jenkins from the Safe Restart Plugin. If you already have the plugin installed, you can restart Jenkins straight from the dashboard left menu bar.
However, if you have not installed the plugin yet, you can follow the steps below to install it.
- Log in to Jenkins, and from the left menu bar on the dashboard, click on Manage Jenkins.
- Now, go to the System Configuration and select Manage Plugins.
- Then, as the Plugin Manager window opens, click on the Available tab.
- Now, on the search bar, type 'Safe restart.' From the search result, tick the box beside the plugin name.
- Then add the plugin by clicking on the Install without restart button.
- After installing the plugin, go back to the dashboard and click on the Restart Safely tab on the left.
- Finally, you will get a notification asking for confirmation to restart Jenkins. Click Yes to proceed with the restart.
3. Restart Jenkins via CLI
Jenkins command line interface is built on Java and works as an add-on to the user's native terminal shell. From the CLI, you can use Java commands to manage Jenkins. With that being said, users can restart Jenkins from the CLI itself.
You will be able to learn more about Jenkins and its CLI functions by participating in DevOps certification online courses.
However, if you want to use Jenkins CLI to restart its functions, you must check out the steps below,
- In the first step, download the .jar file of the Jenkins CLI.
- Now, open the Jenkins dashboard on your browser and click on the Manage Jenkins tab from the left-hand side menu bar.
- Next, scroll down to the Tools and Actions section and click the Jenkins CLI button.
- Download the Jenkins-cli.jar
- As the download completes, open the terminal window and run the below-mentioned syntax to restart Jenkins.
java -jar [path to the jenkins-cli.jar file] -s [Jenkins URL] restart
How to Restart Jenkins in Windows, Linux, and Mac?
After installing Jenkins on your system, it runs as a background process. Therefore, you can easily restart Jenkins on your Linux, Windows, and Mac computer by following the simple commands you follow while restarting other services. However, we have mentioned the steps you may follow below to get the job done. Check them out now!
A. Restart Jenkins in Linux
Run the following syntax on your Linux terminal to restart Jenkins:
sudo systemctl restart Jenkins
B. Restart Jenkins in Windows
There are two ways to restart Jenkins running on a Windows PC. Here are the steps that you need to follow,
- On your Windows computer, open the Command Prompt with administrative rights.
- Then, run the following command to restart Jenkins on Windows.
net stop Jenkins
net start Jenkins
Apart from that, there is another way that you can follow to complete the restart process. Here, you need to use a command that allows you to move to the installation folder and restart the .exe program running for Jenkins. Follow the command below to restart Jenkins on Windows using this command.
cd C:\Program Files\Jenkins
jenkins.exe restart
C. Restart Jenkins in MacOS
On your Mac, you need to use the basic launchctl commands to stop and start the Jenkins services. Follow the commands here,
sudo launchctl unload /Library/LaunchDaemons/org.Jenkins-ci.plist
Restart Jenkins Stages
You can restart Jenkins stages once the Pipeline completes, whether it has succeeded or failed. You can do it from the Jenkins classic UI or the Blue Ocean UI itself. Here is how to do it:
1. Restarting from the Classic UI
Follow the steps below to restart from stages on Jenkins:
- As your Pipeline completes, go to the side panel on the classic UI.
- Next, locate the Restart from Stage button and click on it.
- After that, you will get a list of top-level stages to choose from. Select the stage from where you want to restart.
As you select the stage to restart, a new build will be assigned with a new build number. Also, the previous stages will be excluded, and the Pipeline will execute the selected stage. The Pipeline will start running normally from that point.
Note: The list will show you only the top-level stages that were run originally following the same execution order. Also, it won't show you the skipped stages because of an earlier failure.
However, you will find the skipped stages because of a condition not being satisfied. The list of unavailable stages also includes the parent stage for a group of parallel stages. Along with that, the group nested stages that were supposed to be running sequentially will also be unavailable.
2. Restarting from the Blue Ocean UI
Though it's possible to restart stages from the classic UI, the Blue Ocean Plugin offers a clear and intuitive UI. It makes it easy for the users to view pipeline stages. Follow the steps below to restart Jenkins stages through Blue Ocean UI:
- Firstly, access your project's CI service page.
- Then, select the Open Blue Ocean option from the left menu to find your project's Pipeline.
- Now, select the Pipeline and click on the build you want to restart.
- Then, you have to select the stage from which you want to restart.
- Finally, it will start a new Jenkins run that starts from the stage that you have selected with the same commit information as it is based on.
Also, similar to the previous process a new description will be generated that identifies the preceding run for the build.
Conclusion
Now that I've walked you through the manual restart process and other methods for restarting Jenkins, I hope you won't encounter difficulties in the future. It will now be easier for you to restart Jenkins in Linux, Windows, and Mac. However, if you need more information on Jenkins and how it works, then KnowledgeHut's Jenkins course online can be exclusively beneficial to you. This online course will help you understand Jenkins, Jenkins restart command and its operation much better.
Frequently Asked Questions (FAQs)
1. How to safely restart Jenkins?
2. How do you rerun a pipeline in Azure DevOps?
3. How do I keep the Jenkins pipeline after a host reboot?
Get Free Consultation
By submitting, I accept the T&C and
Privacy Policy