title: How to get active kernel name in Jupyter notebook
body: <p>I would like to make a notebook that prints the active kernel name.
  I registered multiple venvs as kernels using the </p>
  
  <pre><code>python -m ipykernel install --user --name &lt;kernel_name&gt;
  </code></pre>
  
  <p>In the notebook I would like to print some metadata about the active kernel.</p>
  
  <p>How can one get the name of the active kernel?</p>
  
  <hr>
  
  <p>EDIT:</p>
  
  <p>Here are the particular versions in my stack</p>
  
  <pre><code>ipykernel==4.5.2
  ipython==5.3.0
  jupyter==1.0.0
  </code></pre>
  
  <p>nevertheless, the question should be answered in general.</p>