Setting the Default Browser for JupyterLab on Linux

To change the default browser for JupyterLab on Linux, follow these steps:

  1. Open a terminal and run the following command to generate a configuration file for JupyterLab:
    jupyter-lab --generate-config
    

    This will create a jupyter_lab_config.py file in $HOME/.jupyter.

  2. Open this file in your preferred text editor.

  3. Find the line:
    #c.ServerApp.browser = ''
    

    Remove the # to uncomment it.

  4. Replace the empty string '' with the path to your desired browser. For instance, if you want to use Microsoft Edge, update the line to:
    c.ServerApp.browser = '/opt/microsoft/msedge/msedge %s'
    
  5. Save the changes.

Now, when you launch JupyterLab, it should open in your chosen browser by default.




Enjoy Reading This Article?

Here are some more articles you might like to read next:

  • Satu EFI untuk Dua Operating System (Ubuntu 24.04 dan Windows 11) pada dua disk yang berbeda
  • Akses internet ITS melalui myITS-WiFi di Ubuntu
  • Menampilkan Label LaTeX di Matplotlib