I am working on configuring Jenkins. I would like to create .sh script and write below command.


java -jar jenkins.war


as a command. Once above command is execute, I will close terminal. how do I achive this?

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.

1 Answer

answered by (171 points)
0 votes

On ubuntu you can execute any command as seperate process by appending it with & at the end.

Your .sh script should look like as below.

~$ cat runjenkins.sh
java -jar jenkins.jar &