ubuntu installing jenkins
wget -q -O – https://jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add –
sudo sh -c ‘echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list’
sudo apt-get update
sudo apt-get install jenkins
sudo cat /var/lib/jenkins/secrets/initialAdminPassword (to get admin password)
sudo apt-get update
sudo apt-get install jenkins
you can skip last two lines but I followed that way