The Databricks web terminal provides a convenient and highly interactive way to run shell commands in a command-line interface (CLI), including Databricks CLI commands, to take actions on Databricks objects programmatically. It's especially useful for advanced use cases, such as batch operations on multiple files, which existing user interfaces (UIs) might not fully support.
Unlike using SSH, many users can use the web terminal on one compute and it does not require setting up keys.
You can use the web terminal to do the following:
htop
(cluster usage) or nvidia-smi
(GPU usage).mv
and mkdir
.warning
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 there is some sort of conflict, the web terminal might not work as expected. If other web services are launched on port 7681, compute users might be exposed to potential security exploits. Databricks is not responsible for any issues that result from the installation of unsupported software on a compute.
You can launch the web terminal from the compute details page or from a notebook.
From a notebookâTo launch the web terminal from a notebook:
The web terminal opens in a panel at the bottom of the screen. The buttons at the upper-right of the panel allow you to:
From the compute details pageâTo launch the web terminal from the compute details page:
A new tab opens with the web terminal UI and the Bash prompt.
Use web terminalâIn the web terminal, you can run commands from 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.
Run Databricks CLI commandsâYou can also use the web terminal to run Databricks CLI commands. The available CLI is always the latest version, and authentication is based on the current user.
note
Configuration profile commands are not supported when running CLI commands in the web terminal. This is because the web terminal uses environment variables to authenticate to the CLI, which precedes configuration profiles in the authentication order of evaluation.
The compute must meet the following requirements:
Launch the web terminal and run the following command to output information about the current user:
Bash
databricks current-user me
Bundle commands are also available, which allows you to create and manage your Databricks Asset Bundles directly from the web terminal within the Databricks workspace. For example, to create, deploy, and run a simple bundle using the default template:
From the web terminal root, navigate to your workspace home and run bundle init
:
Bash
cd /Workspace/Users/someone@example.com
databricks bundle init
Accept the default template prompts, then change to the bundle directory and deploy it:
Bash
cd my_project
databricks bundle deploy
You can view the deployed my_project
bundle in the Databricks workspace UI.
Finally, run the default job in the bundle:
Bash
databricks bundle run my_project_job
Navigate to Job Runs to see the running job.
You can set persistent configurations for your web terminal using .bashrc configuration files.
Databricks automatically sources files named .bashrc from your workspace file system's home folder. Settings from these files are automatically activated each time you start a new terminal session.
If you want to source any other files (such as .zshrc) for your web terminal experience, source them from your .bashrc file to persist the configuration.
Save all configuration files in your workspace folder where you can configure them using a text editor.
LimitationsâDatabricks does not support running Spark jobs from the web terminal.
Databricks web terminal is not available in the following compute types:
DISABLE_WEB_TERMINAL=true
environment variable set.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.
ARM compute resources on Databricks Runtime below 16.4 cannot use web terminals to access workspace files, including files in Git folders.
Enabling Docker Container Services disables web terminal.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4