The below commands worked for me in Red Hat Linux and should work for Ubuntu also.
To know the status of Jenkins:
sudo service jenkins status
To start the Jenkins:
sudo service jenkins start
To stop the Jenkins:
sudo service jenkins stop
To restart the Jenkins:
sudo service jenkins restart
Demo on command prompt:
[root@varunHome]# sudo service jenkins status
jenkins (pid 7468) is running...
[root@varunHome]# sudo service jenkins stop
Shutting down Jenkins [ OK ]
[root@varunHome]# sudo service jenkins start
Starting Jenkins [ OK ]
[root@varunHome]# sudo service jenkins restart
Shutting down Jenkins [ OK ]
Starting Jenkins [ OK ]
[root@varunHome]#
The folks who are using windows
Open Console/Command line --> Go to your Jenkins installation directory. Execute the following commands respectively:
To stop:
jenkins.exe stop
To start:
jenkins.exe start
To restart:
jenkins.exe restart