title: How to install Jenkins Ubuntu slave as a service?
body: <p>I have a Ubuntu 16.04 LTS machine where I am successfully connected to the Jenkins server via JNLP connection. Steps I took for the connection are the following:</p>
  
  <ol>
  <li>Create a directory in the slave called /home/MyUbuntu/Jenkins</li>
  <li>Download both agent.jar and slave-agent.jnlp files into the
  directory</li>
  <li>Run this command from the terminal:</li>
  </ol>
  
  <p>java -jar agent.jar -jnlpUrl <a href="http://my-jenkins-server:8080/computer/MyNode/slave-agent.jnlp" rel="noreferrer">http://my-jenkins-server:8080/computer/MyNode/slave-agent.jnlp</a> -secret 6f8bb3250d6dbcda77979797997b0ea6bcaaa064785d558c0e4ea07d03 -workDir "/home/MyUbuntu/Jenkins"</p>
  
  <p>The connection is successful.</p>
  
  <p><strong>Problem:</strong> 
  Once I close the terminal the connection gets disconnected.</p>
  
  <p><strong>Question:</strong>
  How do I add this as a service in Ubuntu 16.04 LTS so whenever the machine is rebooted it starts as a startup??? </p>