title: Why the environment variables shown by shell and jenkins different?
body: <p>I found the environment variables shown by shell and jenkins is different. When I see $PATH by echo, it shows as follows;</p>
  
  <pre><code># cat /etc/passwd | grep jenkins
  jenkins:x:998:997:Jenkins Continuous Integration Server:/var/lib/jenkins:/bin/bash
  # su jenkins
  bash-4.2$ echo $PATH
  /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
  </code></pre>
  
  <p>However when I exec "echo $PATH" on Jenkins by (Build -> Execute shell), console log shows as follows;</p>
  
  <pre><code>[workspace] $ /bin/sh -xe /tmp/hudson6923847933544830986.sh
  + echo /sbin:/usr/sbin:/bin:/usr/bin
  /sbin:/usr/sbin:/bin:/usr/bin
  Finished: SUCCESS
  </code></pre>
  
  <p>Not only $PATH but many other variables are also different, but $PATH is important to execute command and I don't understand why they are not the same. Do you have any idea?</p>