Skip to content

Instantly share code, notes, and snippets.

@prateek-code-22
Created August 5, 2025 09:12
Show Gist options
  • Save prateek-code-22/2bcce1a4004b73ebbd9ff4aceb6b643c to your computer and use it in GitHub Desktop.
Save prateek-code-22/2bcce1a4004b73ebbd9ff4aceb6b643c to your computer and use it in GitHub Desktop.
Install jenkins on ubuntu machine
sudo apt update && sudo apt upgrade -y
sudo apt install openjdk-21-jdk -y
curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key | sudo tee /usr/share/keyrings/jenkins-keyring.asc > /dev/null
echo "deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] https://pkg.jenkins.io/debian-stable binary/" | sudo tee /etc/apt/sources.list.d/jenkins.list > /dev/null
sudo apt update && sudo apt install jenkins -y
sudo systemctl enable jenkins
sudo systemctl start jenkins
sudo systemctl status jenkins
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment