title: Way to get jupyter server root directory
body: <p>Consider following:</p>
  
  <pre><code>$ cd /home/mydir
  $ jupyter notebook --port=8888
  </code></pre>
  
  <p>In plain English, I am running jupyter server from <code>/home/mydir</code> directory.</p>
  
  <p>Is there a simple way to get this directory from within a notebook regardless if it's a R notebook or a Python notebook or whatever? Maybe there is some magic command or variable?</p>
  
  <p>NOTE: getwd() is not an answer as it returns directory of a current notebook but not the jupyter server root.</p>