title: NVM is not working on Jenkins execute shell
body: <p>I am trying to install and use nvm from the Jenkins execute shell script on Ubuntu server but I am getting this error:</p>
  
  <blockquote>
    <p>16:00:21 /tmp/hudson5983664925305072739.sh: line 8: nvm: command not
    found</p>
  </blockquote>
  
  <p>This is what I have tried those so far but no success:</p>
  
  <pre><code>#!/bin/bash
  
  touch ~/.profile &amp;&amp; source ~/.profile;
  nvm current || echo "SSH NVM is being installed" &amp;&amp;  touch ~/.profile &amp;&amp; curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh -o install_nvm.sh &amp;&amp; bash install_nvm.sh &amp;&amp; source ~/.profile
  
  echo "checking nvm"
  bash ~/.nvm/nvm.sh;
  nvm --version || exit 1;
  </code></pre>
  
  <p>Jenkins execute shell screenshot:</p>
  
  <p><a href="https://i.stack.imgur.com/3QAU5.png" rel="noreferrer"><img src="https://i.stack.imgur.com/3QAU5.png" alt="enter image description here"></a></p>