Jupyter notebook comes with the useful command:
jupyter notebook list
which outputs all the running server instances for the current user. Besides it lists the relevant access tokens.
Jupyter lab seems not to have this feature.
Cruising through the jupyter lab
manual I could not find the analogous command (not the analogous syntax seems to work).
Any suggestion on how to get ports and tokens for the running servers?
It seems like you can still call jupyter notebook list
within any terminal to list all the running notebook instances, including those within jupyter lab.
If you are using JupyterLab 3.0+, the command you're looking for is:
jupyter server list
One can now use the list
command with Jupyter lab to show running servers:
jupyter lab list
If you want to list the associated sessions for that server there doesn't appear to be built-in command but (as mentioned here) you can run this to a get prettified (with jq
) JSON list using the Jupyter REST API - assuming your server runs at localhost:8888
and :
curl -sSLG localhost:8888/api/sessions --data-urlencode `jupyter lab list | awk '/token/ {split($1,a,"?")} END {print a[2]}'` | jq
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With