Run shell commands in Databricks web terminal

Databricks web terminal provides a convenient and highly interactive way for you to run shell commands and use editors, such as Vim or Emacs, on the Spark driver node. Unlike using SSH, web terminal can be used by many users on one compute and does not require setting up keys. Example uses of the web terminal include monitoring resource usage and installing Linux packages.

Web terminal is disabled by default for all workspace users.

Enabling Docker Container Services disables web terminal.


Databricks proxies the web terminal service from port 7681 on the compute’s Spark driver. This web proxy is intended for use only with the web terminal. If the port is occupied when the compute starts or if there is otherwise a conflict, the web terminal may not work as expected. If other web services are launched on port 7681, compute users may be exposed to potential security exploits. Databricks is not responsible for any issues that result from the installation of unsupported software on a compute.


Launch the web terminal

You can launch the web terminal from the compute detail page or from a notebook.

  • To launch web terminal from the compute detail page, click the Apps tab and then click Web Terminal. A new tab opens with the web terminal UI and the Bash prompt.

  • To launch web terminal from a notebook, click the attached compute drop-down, hover over the attached compute, then click Web Terminal. The web terminal opens in a panel at the bottom of the screen.

    In the web terminal panel in the notebook, you can use the buttons at the upper-right of the panel to do the following:

    • Open a new terminal session in a new tab open a new terminal session.

    • Reload a terminal session reload terminal session.

    • Close the bottom panel close bottom panel. To reopen the panel, click reopen bottom panel at the bottom of the right sidebar.

Use web terminal

In the web terminal, you can run commands as root inside the container of the compute driver node.

Each user can have up to 100 active web terminal sessions (tabs) open. Idle web terminal sessions may time out and the web terminal web application will reconnect, resulting in a new shell process. If you want to keep your Bash session, Databricks recommends using tmux.


  • Databricks does not support running Spark jobs from the web terminal. In addition, Databricks web terminal is not available in the following compute types:

    • Job compute

    • Compute launched with the DISABLE_WEB_TERMINAL=true environment variable set.

    • Compute launched with access mode set to Shared.

    • Compute launched with the Spark configuration spark.databricks.pyspark.enableProcessIsolation set to true.

  • There is a hard limit of 12 hours since the initial page load, after which any connection, even if active, will be terminated. You can refresh the web terminal to reconnect. Databricks recommends using tmux to preserve your shell session.