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. The web terminal can be used by many users on one cluster. 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.

Warning

Databricks proxies the web terminal service from port 7681 on the cluster’s Spark driver. This web proxy is intended for use only with the web terminal. If the port is occupied when the cluster 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, cluster 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 cluster.

Requirements

Launch the web terminal

To launch the web terminal, do one of the following:

  • In a cluster detail page, click the Apps tab and then click Launch Web Terminal.

  • In a notebook, click the attached cluster drop-down, hover over the attached cluster, then click Terminal.

A new tab opens with the web terminal UI and the Bash prompt. Here you can run commands as root inside the container of the cluster driver node.

Web Terminal UI

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.

Limitations

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

    • Job clusters

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

    • Clusters launched with access mode set to Shared.

    • Clusters 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.

  • Enabling Docker Container Services disables web terminal.