- Blog Categories
- Project Management
- Agile Management
- IT Service Management
- Cloud Computing
- Business Management
- BI And Visualisation
- Quality Management
- Cyber Security
- Most Popular Blogs
- PMP Exam Schedule for 2025: Check PMP Exam Date
- Top 60+ PMP Exam Questions and Answers for 2025
- PMP Cheat Sheet and PMP Formulas To Use in 2025
- What is PMP Process? A Complete List of 49 Processes of PMP
- Top 15+ Project Management Case Studies with Examples 2025
- Top Picks by Authors
- Top 170 Project Management Research Topics
- What is Effective Communication: Definition
- How to Create a Project Plan in Excel in 2025?
- PMP Certification Exam Eligibility in 2025 [A Complete Checklist]
- PMP Certification Fees - All Aspects of PMP Certification Fee
- Most Popular Blogs
- CSM vs PSM: Which Certification to Choose in 2025?
- How Much Does Scrum Master Certification Cost in 2025?
- CSPO vs PSPO Certification: What to Choose in 2025?
- 8 Best Scrum Master Certifications to Pursue in 2025
- Safe Agilist Exam: A Complete Study Guide 2025
- 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 2025
- State of Agile: Things You Need to Know
- Top 24 Career Benefits of a Certifed Scrum Master
- Most Popular Blogs
- ITIL Certification Cost in 2025 [Exam Fee & Other Expenses]
- Top 17 Required Skills for System Administrator in 2025
- How Effective Is Itil Certification for a Job Switch?
- IT Service Management (ITSM) Role and Responsibilities
- Top 25 Service Based Companies in India in 2025
- 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 2025
- 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 2025
- 15 Best Azure Certifications 2025: Which one to Choose?
- Top 22 Cloud Computing Project Ideas in 2025 [Source Code]
- How to Become an Azure Data Engineer? 2025 Roadmap
- Top Picks by Authors
- Top 40 IoT Project Ideas and Topics in 2025 [Source Code]
- The Future of AWS: Top Trends & Predictions in 2025
- AWS Solutions Architect vs AWS Developer [Key Differences]
- Top 20 Azure Data Engineering Projects in 2025 [Source Code]
- 25 Best Cloud Computing Tools in 2025
- 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 2025? Step-by-Step
- Top Picks by Authors
- Top 20 Business Analytics Project in 2025 [With Source Code]
- ECBA Certification Cost Across Countries
- Top 9 Free Business Requirements Document (BRD) Templates
- Business Analyst Job Description in 2025 [Key Responsibility]
- Business Analysis Framework: Elements, Process, Techniques
- Most Popular Blogs
- Best Career options after BA [2025]
- Top Career Options after BCom to Know in 2025
- Top 10 Power Bi Books of 2025 [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 2025
- Top 45 Career Options After BBA in 2025 [With Salary]
- Top Power BI Dashboard Templates of 2025
- 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 2025 [Examples + Tips]
- 20 Best Quality Management Certifications That Pay Well in 2025
- 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 2025 [Free CISSP Dumps]
- CISSP vs Security+ Certifications: Which is Best in 2025?
- Best CISSP Study Guides for 2025 + CISSP Study Plan
- How to Become an Ethical Hacker in 2025?
- Top Picks by Authors
- CISSP vs Master's Degree: Which One to Choose in 2025?
- CISSP Endorsement Process: Requirements & Example
- OSCP vs CISSP | Top Cybersecurity Certifications
- How to Pass the CISSP Exam on Your 1st Attempt in 2025?
- More
- 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]
By Mayank Modi
Updated on Apr 28, 2025 | 10 min read | 24.68K+ views
Share:
Table of Contents
View all
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 on how 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.
Whether you're a beginner or an experienced DevOps engineer, knowing how to restart Jenkins in Windows is a fundamental skill when managing CI/CD pipelines.
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 method is a safe restart, while the other is a Jenkins force restart, which skips waiting for running builds to finish. 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.
Whether you're using the dashboard, a plugin, or CLI, knowing how to restart Jenkins correctly ensures builds aren’t disrupted unexpectedly.
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.'
These steps show how to restart Jenkins through its built-in dashboard safely without interrupting ongoing processes.
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 so, here’s how to restart Jenkins directly through the URL bar using a simple command. 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 following command on the URL to perform a Jenkins force restart. This will immediately restart Jenkins without waiting for running builds to be completed.
[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.
Using the CLI gives you more control, including the ability to trigger a Jenkins force restart directly from your terminal.
java -jar [path to the jenkins-cli.jar file] -s [Jenkins URL] restart
Prerequisites for Manually Restarting Jenkins
Before restarting Jenkins manually, it’s a good idea to check a few things to make sure everything goes smoothly. These aren't complicated steps but skipping them can lead to unnecessary issues.
First, make sure you access the Jenkins dashboard and that you have admin rights. Regular users won’t be able to restart the system, so you’ll need proper permissions.
Next, use a reliable web browser like Chrome, Firefox, Safari, or Edge. Jenkins works best on these and using an outdated or unsupported browser might cause interface glitches.
Also, Jenkins should already be installed on the machine or server you're working with. If it’s not set up yet, you’ll need to install it first. Installation steps vary depending on the operating system, so follow the relevant guide for Windows, CentOS, or whichever OS you're using.
Verifying installation is especially important if you plan to use commands like the Jenkins restart service from the system terminal.
Don’t forget your Jenkins credentials. You’ll need a valid username and password to log in, especially since admin tasks like restarting require higher-level access.
And while not mandatory, having a stable internet connection helps. You don’t want to lose access halfway through the restart process.
Once you’ve ticked off all these boxes, you’re all set to restart Jenkins without any hiccups.
How to Restart Jenkins in Windows, Linux, and Mac?
After installing Jenkins on your system, it runs as a background process, making Jenkins service restart a straightforward task using platform-specific commands. Therefore, you can easily restart Jenkins on your Linux, Windows, and Mac computer by following the simple commands you follow while restarting other services. Below, we’ve listed platform-specific commands that show you exactly how to restart Jenkins in Linux, Windows, and macOS environments.
A. Restart Jenkins in Linux
Run the following syntax on your Linux terminal to restart Jenkins:
sudo systemctl restart Jenkins
This command initiates a clean Jenkins service restart, shutting down the current process and launching a fresh one without affecting the underlying system.
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.
Both approaches ensure a reliable Jenkins service restart on Windows, whether you’re using Command Prompt or restarting the executable directly.
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 macOS, using “launchctl” is the most effective way to perform a Jenkins service restart without disrupting system processes. Follow the commands here,
sudo launchctl unload /Library/LaunchDaemons/org.Jenkins-ci.plist
Restart Jenkins Stages
Along with knowing how to restart Jenkins, it’s also helpful to learn how to restart specific pipeline stages once a build has completed 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.
While this method focuses on restarting individual stages, it’s still useful to know when a full Jenkins restart service might be necessary to clear system-wide issues.
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 on how to restart 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?
4. Can I use Jenkins force restart during active builds?
5. What’s the easiest way to restart Jenkins in Windows?
6. What is the Jenkins restart service command for Linux?
7. Can I automate the Jenkins restart service during deployments?
86 articles published
Mayank Modi is a Red Hat Certified Architect with expertise in DevOps and Hybrid Cloud solutions. With a passion for technology and a keen interest in Linux/Unix systems, CISCO, and Network Security, ...
Get Free Consultation
By submitting, I accept the T&C and
Privacy Policy
Preparing to hone DevOps Interview Questions?