Get a Quote   (408) 943-4100               TrueNAS Discord      VendOp_Icon_15x15px   Commercial Support Toggle between Light and Dark mode

Using Shell

  2 minute read.

Last Modified 2022-04-26 14:48 EDT

The web interface has a web shell that makes it convenient to run command line tools from the web browser as the root user.

UIShell

The prompt shows that the current user is root@truenas, the host name is truenas, and the current working directory is ~, where root is the user, truenas is the home directory of the logged-in user, and the sysmbol between the square brackets is the working directory.

The default shell for a new installations is zsh. See Changing the Default Shell for instructions on changing to a different shell.

Not all shell features render correctly in Chrome. Firefox is the recommended browser when using the shell.

Most FreeBSD command line utilities are available in the Shell, including additional troubleshooting applications for TrueNAS Core and Enterprise.
For TrueNAS SCALE, most Linux command line utilities are available in the shell.

Shell command history is available for the current session.

See Shell for information on the shell UI screen.

Using the Keyboard in Shell

Use the keyboard Up and Down arrow keys to scroll through previously entered commands.

After you edit a command press Enter to re-enter the command.

The keyboard Home, End, and Delete keys are supported.

Using keyboard Tab completion is also available. Type a few letters and press Tab to complete a command name or filename in the current directory.

Right-click in the terminal window to display a reminder about using Command+c and Command+v or Ctrl+Insert and Shift+Insert for copy and paste operations in the shell.

Clearing Shell or Exiting

Navigating away from the Shell screen clears the command history.

Entering the CLI command exit leaves the session.

Clicking other web interface menus closes the shell session and stops commands running in the shell.

Starting a New Session

Click Reconnect to start a new session.

Detaching and Reattaching Shell Sessions

The CLI tmux command provides the ability to detach shell sessions and then reattach to them later. Commands continue to run in a detached session.