Using Shell
2 minute read.
The TrueNAS Shell is convenient for running command line tools, configuring different system settings, or finding log files and debug information.
Warning! The supported mechanisms for making configuration changes are the TrueNAS WebUI and API exclusively. All other are not supported and result in undefined behavior that can result in system failure!
The Font Size remove and add buttons adjust the displayed text size in the Shell.
The shell window stores the command history for the current session.
Leaving the Shell screen clears the command history.
This section provides keyboard navigation shortcuts you can use in Shell.
Action | Keyboard/Command | Description |
---|---|---|
Scroll up | Up arrow | Scroll up through previous commands. |
Scroll down | Down arrow | Scroll down through following commands. |
Top of screen | Home | Moves the cursor to the top of the screen when viewing entries and results. |
Bottom of screen | End | Moves the cursor to the bottom of the screen command when viewing entries and results. |
Delete | Delete | Deletes highlighted text. |
Auto-fill text | Tab | Type a few letters and press Tab to complete a command name or filename in the current directory. |
right-click | Right-clicking in the terminal window opens the browser default right click menu, which allows you to use native copy and paste functions. | |
Exit to root prompt | exit | Entering exit leaves the session. |
Copy text | Ctrl+Insert | Enter Ctrl+Insert to copy highlighted text in Shell. |
Paste text | Shift+Insert | Enter Shift+Insert to paste copied text in Shell. |
Kill running process | Ctrl+c | Enter Ctrl+c to kill a process running in Shell. For example, the ping command. |
zsh is the default shell, but you can change this by going to Credentials > Users. Select the admin or other user to expand it. Click Edit to open the Edit User screen. Scroll down to Shell and select a different option from the dropdown list. Options are nologin, TrueNAS CLI, TrueNAS Console, sh, bash, rbash, dash, tmux, and zsh. Click Save.
Admin users can set the Shell to default to the TrueNAS Console by selecting TrueNAS Console in Shell on the Edit User screen.
Clicking other TrueNAS UI menu options closes the shell session and stops commands running in the Shell screen.
Tmux allows you to detach sessions in Shell and then reattach them later. Commands continue to run in a detached session.