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

Using Shell

  3 minute read.

Last Modified 2022-09-15 14:38 EDT

The SCALE Shell is convenient for running command lines tools, configuring different system settings, or finding log files and debug information. The Shell screen opens with the root user logged in.

Warning! The supported mechanisms for making configuration changes are the TrueNAS WebUI, CLI, and API exclusively. All other are not supported and result in undefined behavior that can result in system failure!

SystemShellSCALE

The Set font size slider adjusts the Shell displayed text size. Restore Default resets the font size to default.

The Shell stores the command history for the current session.

Leaving the Shell screen clears the command history.

Click Reconnect to start a new session.

This section provides keyboard navigation shortcuts you can uses in Shell.

ActionKeyboard/
Command
Description
Scroll upUp arrow expand_lessScroll up through previous commands.
Scroll downDown arrow expand_moreScroll down through following commands.
Re-enter commandEnterAfter entering a command, press Enter to re-enter the command.
HomeMoves the cursor to the top of the screen entries and results.
EndMoves the cursor to the bottom of the screen command entries and results.
DeleteDeletes what you highlight.
TabType a few letters and press Tab to complete a command name or filename in the current directory.
right-clickRight-clicking in the terminal window displays a reminder about using Command+c and Command+v or Ctrl+Insert and Shift+Insert for copy and paste operations.
exitEntering exit leaves the session.
Ctrl+InsertEnter Ctrl+Insert to copy highlighted text in Shell.
Shift+InsertEnter Shift+Insert to paste copied text in Shell.
Ctrl+cEnter Ctrl+c to kill a process running in Shell. For example, the ping command.

Changing the Default Shell

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

zsh is the default Shell, but you can change this by editing the root user. Go to Credentials > Local Users and expand the root user. Click Edit to open the Edit User screen. Scroll down to Shell and select a different option from the dropdown list. Most Linux command-line utilities are available in the Shell. Click Save.

Tmux allows you to detach sessions in Shell and then reattach them later. Commands continue to run in a detached session.

Experimental CLI

The experimental SCALE command-line interface (CLI) lets you directly configure SCALE features.

SCALE CLI is experimental and still in active development. We are not accepting bug reports or feature requests at this time.

To switch to the experimental CLI, enter cli.

CommandDescription
..up one level
exitexit the CLI
lslist the available directories and commands
? or helplist the built-in commands
The CLI features an auto-suggest mechanism for commands. When you begin typing a command, the CLI shows a list of all matching commands.

ScaleCLIAutocomplete

We intend the CLI to be an alternative method for configuring TrueNAS features. Because of the variety of available features and configurations, we include CLI-specific instructions in their respective UI documentation sections.

Related Content