Step 1: Goto https://www.jenkins.io/download/

Step 2: Scroll down and click Generic Java Package( .war)

Step 3: From the command line, go to download folder where jenkins.war located.
cd [/path to the downloaded folder]

Step 4: Run the command below , you can specify any port number by default it will take 8080
java -jar jenkins.war –httpPort=9191

(Please make sure you have java downloaded (check by this command java -version). If you don’t have java you can download it and try again.

Step : 5 Hit localhost:9191 (use your port if different than 9191) and below screen will populate.


Step :6 Use password displayed on the command line and hit continue .

Step:7 If you the plugins then select plugins to install otherwise Install suggested plugins.

Step :8 It will download the plugins

Step:9 Create the admin user and click save and continue button.

Step 10. In instance configuration, just leave as it is and Click save and Finish button.

Congratulations !!
Here you go, your jenkins is up and running. Enjoy it.

To remove jenkins use below command.

sudo rm -rf /var/root/.jenkins ~/.jenkins