Workarounds with Ubuntu

Remotely accessing jupyter notebooks

Running a jupyter notebook on the server and would like to access locally?

  • Run the notebook as usual on the host machine but without browser

$ jupyter-notebook --no-browser --port 9999

  • Forward the traffic from the host port to the local client port as follows:

$ ssh -N -L localhost:8888:localhost:9999 user@host_ip

  • Run the jupyter notebook locally in the browser as follows:


Constantly update the output of a command

$ watch -n1 iwconfig

Important options

  • n1 : updates the command after every 1 second
  • d : highlight the changes in the update of the command

Git push without entering username and password

  • Check your current remote
       $ git remote -v
          origin (fetch)
          origin (push)
  • Switch remote access of repository from HTTPS to SSH
      $ git remote set-url origin
  • Verify the remote is infact SSH
       $ git remote -v
          origin (fetch)
          origin (push)    
  • Generate ssh key (if you do not have one already)
      $ ssh-key gen
  • Copy your public-id to github and add it under New SSH key