> ## Excerpt
> Introduces the TrueNAS CLI and the basic namespaces and commands accessed from Shell.
---
- [Launching the TrueNAS CLI](https://www.truenas.com/docs/scale/scaleclireference/#launching-the-truenas-cli)
- [Entering the TrueNAS CLI from Console Setup Menu](https://www.truenas.com/docs/scale/scaleclireference/#entering-the-truenas-cli-from-console-setup-menu)
- [Entering the TrueNAS CLI in the Linux Shell](https://www.truenas.com/docs/scale/scaleclireference/#entering-the-truenas-cli-in-the-linux-shell)
- [Exiting the TrueNAS CLI from the Linux Shell](https://www.truenas.com/docs/scale/scaleclireference/#exiting-the-truenas-cli-from-the-linux-shell)
- [Getting Help](https://www.truenas.com/docs/scale/scaleclireference/#getting-help)
- [Accessing Basic Commands](https://www.truenas.com/docs/scale/scaleclireference/#accessing-basic-commands)
- [Navigating Namespaces](https://www.truenas.com/docs/scale/scaleclireference/#navigating-namespaces)
- [Parent and Child Namespaces](https://www.truenas.com/docs/scale/scaleclireference/#parent-and-child-namespaces)
- [Entering Namespaces and Commands](https://www.truenas.com/docs/scale/scaleclireference/#entering-namespaces-and-commands)
- [Using Keyboard Arrow Keys](https://www.truenas.com/docs/scale/scaleclireference/#using-keyboard-arrow-keys)
- [Command Syntax](https://www.truenas.com/docs/scale/scaleclireference/#command-syntax)
- [Using the Interactive Arguments Editor](https://www.truenas.com/docs/scale/scaleclireference/#using-the-interactive-arguments-editor)
- [Namespace Documentation](https://www.truenas.com/docs/scale/scaleclireference/#namespace-documentation)
---
> The TrueNAS CLI guide for SCALE is a work in progress! New namespace and command documentation is continually added and maintained, so check back here often to see what is new!
Welcome to the TrueNAS SCALE Command Line Interface (CLI) guide!
The **TrueNAS CLI** in TrueNAS SCALE functions like a text-based version of the web UI with many functional areas grouped into parent and child namespaces that mirror the counterparts in the SCALE UI.
The underlying structure of the CLI namespaces and commands closely follows that of the SCALE API. For more information on API commands, arguments, options, and definitions go to **API Keys** and click on **API Docs** in the SCALE UI.
## Launching the TrueNAS CLI[](https://www.truenas.com/docs/scale/scaleclireference/#launching-the-truenas-cli "Anchor to: Launching the TrueNAS CLI")
The SCALE Shell automatically opens in the SCALE CLI if the admin user **Shell** setting on the **Credentials > Local User > Add User** or **Edit User** screen is set to **TrueNAS CLI**. If set to a different shell option such as bash or zsh, enter `cli` at the prompt on the **shell** screen.
You can also access the TrueNAS CLI through either the Console Setup Menu.
You can access the Console Setup Menu when you SSH into the TrueNAS system, after you install SCALE from the iso, or from the Shell. If you set the admin user **Shell** setting to **TrueNAS Console**, the Shell opens in the console setup menu.
To open the TrueNAS CLI from the [Console Setup Menu](https://www.truenas.com/docs/scale/gettingstarted/install/consolesetupmenuscale/), enter `6`.

### Entering the TrueNAS CLI in the Linux Shell[](https://www.truenas.com/docs/scale/scaleclireference/#entering-the-truenas-cli-in-the-linux-shell "Anchor to: Entering the TrueNAS CLI in the Linux Shell")
The **Shell** screen opens in the shell option selected in the **Shell** setting on the **Credentials > Local User > Add User** or **Edit User** screen. If set to zsh, bash, or the other options other than **TrueNAS CLI** or **TrueNAS Console**, the screen opens at a Linux prompt.
To access the TrueNAS CLI from the Linux shell, enter `cli` at the prompt and press Enter.

### Exiting the TrueNAS CLI from the Linux Shell[](https://www.truenas.com/docs/scale/scaleclireference/#exiting-the-truenas-cli-from-the-linux-shell "Anchor to: Exiting the TrueNAS CLI from the Linux Shell")
To exit the TrueNAS CLI, enter `quit` or `exit`.
## Getting Help[](https://www.truenas.com/docs/scale/scaleclireference/#getting-help "Anchor to: Getting Help")
The SCALE CLI includes help text for some namespaces and commands through the both the `man`, and `ls` commands. To see the basic commands from any namespace, enter `help`.
Use the `man` command to show the help text for a namespace or command with options. Type `man _namespacename_` or `man _commandname_` to display the help text for that namespace or command.
Use the `ls` command while in a child namespace to view a list of commands and the help text descriptions. You can use the `ls` command for some commands that show an autofill list of options to display a list of those options with help text descriptions.

Note, not all namespaces, commands, or commands with options include help text.
Using `ls` with some commands with autofill options does not always display a list view or help text for the options.
## Accessing Basic Commands[](https://www.truenas.com/docs/scale/scaleclireference/#accessing-basic-commands "Anchor to: Accessing Basic Commands")
The TrueNAS CLI includes basic commands available from the CLI prompt or while in any namespace in the CLI. To access these basic options, enter `?` or `help`, then press Enter. The list of basic commands displays.

| Command | Description |
| --- | --- |
| `**..**` | Moves up one level. For example, from a namespace like **auth**, enter `..` to return to the CLI prompt. From a child namespace like **interfaces**, use `..` to return to the **network** parent namespace. |
| `**exit**` | Leave the TrueNAS CLI and return to the system prompt. |
| `**ls**` | Lists the namespaces and commands from the active CLI level. For example, at the top level, `ls` displays the main namespaces in the TrueNAS CLI, or at a main namespace level, displays the additional namespaces or commands for that level. |
| `**man**` | When in a namespace, displays the help text for the command that follows `man`. For example, while in the **network** namespace, enter `man create` to see the help text for the `create` command. |
| `**menu**` | Displays the Console setup menu in the TrueNAS CLI. Type `6` to exit the menu and return to the CLI prompt. |
| `**?**` | Displays the list of basic commands for the TrueNAS CLI. |
| `**/**` | Returns to the main TrueNAS CLI prompt from any namespace. |
| `**.mode**` | Gets or sets the output mode. |
| `**.stacks**` | Enables/disables printing stack traces for errors. |
## Navigating Namespaces[](https://www.truenas.com/docs/scale/scaleclireference/#navigating-namespaces "Anchor to: Navigating Namespaces")
The TrueNAS CLI provides eleven top level (parent) namespaces that correspond to SCALE UI functions but not all namespaces mirror the UI counterpart. For example, the **system** name space includes **alerts** and **certificates** in the CLI but in the UI the counterpart is **System Settings**, and neither **Alerts** or **Certificates** are found under **System Settings**. Each parent namespace has child namespaces and commands.
Use the `ls` command to view the list of namespaces or commands.

### Parent and Child Namespaces[](https://www.truenas.com/docs/scale/scaleclireference/#parent-and-child-namespaces "Anchor to: Parent and Child Namespaces")
| Namespace | Description |
| --- | --- |
| **account** | Provides access to the **user** and **group** namespaces and commands. In the UI these are found on the \*\*[Credentials](https://www.truenas.com/docs/scale/scaleuireference/credentials/) screen. |
| **app** | Provides access to the **catalog**, **chart\_release**, **container**, **docker** and **kubernetes** namespaces and commands. |
| **auth** | Provides access to the authentication **api\_key**, **privilege**, **sessions**, and **two\_factor** namespaces and commands. |
| **directory\_service** | Provides access to directory services **activedirectory**, **idmap**, **kerberos**, and **ldap** namespaces and commands. |
| **filesystem** | Provides access to the **acltemplate** namespace. |
| **network** | Provides access to network **configuration**, **dns**, **interface**, **ipmi**, **route**, and **static\_route** namespaces and commands. |
| **service** | Provides access to service **cluster**, **ctdb**, **dyndns**, **ftp**, **gluster**, **ipmi**, **nfs**, **openvpn**, **rsync**, **rsync\_mod**, **s3**, **smart**, **smb**, **snmp**, **ssh**, **tftp**, **vm**, and **webdav** namespaces and commands. |
| **sharing** | Provides access to sharing **iscsi**, **nfs**, **smb**, and **webdav** namespaces and commands. |
| **storage** | Provides access to storage **dataset**, **disk**, **enclosure**, **filesystem**, **pool**, **resilver**, **scrub**, **snapshot**, and **vmware** namespaces and commands. |
| **system** | Provides access system **acme**, **advanced**, **alert**, **boot**, **bootenv**, **certificate**, **config**, **core**, **failover**, **general**, **keychain\_credential**, **kmip**, **mail**, **ntp\_server**, **reporting**, **support**, **system\_dataset**, **truecommand**, **truenas**, **tunable**, **update**, and **version** namespaces and commands. |
| **task** | Provides access to task **cloud\_sync**, **cron\_job**, **replication**, **rsync**, **smart\_test**, and **snapshot** namespaces and commands. |
### Entering Namespaces and Commands[](https://www.truenas.com/docs/scale/scaleclireference/#entering-namespaces-and-commands "Anchor to: Entering Namespaces and Commands")
> CLI namespaces and commands are case sensitive. Enter commands in lower case unless the CLI autofill indicates otherwise.
To enter a namespace or command, begin typing the name. The CLI displays an autofill list that begins with the letter typed and is available in that part of the CLI. Press the down arrow to select the name of the command or namespace. For example, the autofill list at the main CLI prompt includes only the parent namespaces that begin with the letter typed.

To enter a basic command such as checking current configuration settings in a namespace, enter `_namespace childnamespace_ config`. The system displays the configured settings for the namespaces preceding the `config` command.
You can enter a namespace, child namespace, command, command properties (options) and arguments (property=value pairs) from the main CLI prompt using autofill options. For example, `_parent namespace child namespace command property=value_`.

You can enter a namespace, then enter the child namespace, command, then select the command property to enter the argument (property=value) from the namespace prompt.

A command without properties does not show an autofill list. Press space to see if the command has more properties or wants input, or press Enter to apply the command.
To go up one namespace or command level, enter `..`. Enter `/` to return to the main CLI prompt and to exit the namespace(s).
### Using Keyboard Arrow Keys[](https://www.truenas.com/docs/scale/scaleclireference/#using-keyboard-arrow-keys "Anchor to: Using Keyboard Arrow Keys")
Use the up or down arrow keys to select an autofill option, then press space to apply it.
You can use Backspace to erase entered text to start over.
Use the left arrow to move the cursor to the left in a command string where you change the text or use Delete to remove anything to the right of the cursor.
Use the right arrow to move the cursor to the right to the end of the command string to either continue entering command options, or to press Enter to apply the command.
### Command Syntax[](https://www.truenas.com/docs/scale/scaleclireference/#command-syntax "Anchor to: Command Syntax")
TrueNAS CLI command structure varies by namespace. CLI commands can include properties (options) and/or arguments (property=value pairs), and might include flags.
Command properties that require a single value automatically add the `=` delimiter after the property on the autofill list and after reaching the end of the command property inputs.
Some commands allow entering multiple arguments enclosed in curly brackets. These curly brackets could enclose multiple arguments in square brackets separated by a comma and space. Argument properties (options) and values might require double quotes around each, and are separated by a colon `:` instead of the equal sign.
Each namespace article includes command syntax examples for each namespace.
### Using the Interactive Arguments Editor[](https://www.truenas.com/docs/scale/scaleclireference/#using-the-interactive-arguments-editor "Anchor to: Using the Interactive Arguments Editor")
Enter the `--` flag following any CLI command to open the **interactive arguments editor** text-based user interface (TUI).
Click for a detailed example[](https://www.truenas.com/docs/scale/scaleclireference/#expand-1 "Copy link")
Enter `account user create --` to open the **user\_create** TUI.
[](https://www.truenas.com/docs/images/SCALE/CLI/CLIUserCreateInteractiveArgumentsEditor.png)
Both `username:` and `full_name:` are required and enabled by default.
Either `group:` or `group_create:` and `password:` or `password_disabled:` are also required properties. You must enable and configure one property for each pair.
All other disabled properties are optional.
To provide values for enabled properties, enter a value following the provided property. For example, `username: testuser`.
To enable a property, remove `#` from the corresponding line and then enter its value. For example,
```
# Integer: If `uid` is not provided it is automatically filled with the next one available.
# uid:
```
is entered as:
```
# Integer: If `uid` is not provided it is automatically filled with the next one available.
uid: 3000
```
Where _3000_ is an available user identification (UID) number.
Enter values for all required and any optional properties you want to configure. **Save** the modified file then **Quit** to exit the TUI and execute the `user_create` command.
## Namespace Documentation[](https://www.truenas.com/docs/scale/scaleclireference/#namespace-documentation "Anchor to: Namespace Documentation")
There are eleven primary or parent namespaces. Some of the primary namespaces include commands as well as having child namespaces. Each child namespaces has commands to perform various actions.
- [⎙ Download or Print](https://www.truenas.com/docs/scale/scaleclireference/scalecliprint/): View the entire CLI Reference Guide as a single page for download or print.
- [Account](https://www.truenas.com/docs/scale/scaleclireference/account/): Introduces the TrueNAS CLI account namespace, used to access user and group child namespaces and commands.
- [App](https://www.truenas.com/docs/scale/scaleclireference/app/): Introduces the TrueNAS CLI app namespace and provides access to child namespaces and commands including catalog, chart\_release, container, docker, and kubernetes.
- [Auth](https://www.truenas.com/docs/scale/scaleclireference/auth/): Introduces the TrueNAS CLI auth namespace and provides access to child namespaces and commands used to configure user authentication and generate an access token for the web UI.
- [Directory Service](https://www.truenas.com/docs/scale/scaleclireference/directory-service/): Introduces the TrueNAS CLI directory\_service namespace and provides access to child namespaces and commands including activedirectory, idmap, kerberos, and ldap.
- [Filesystem](https://www.truenas.com/docs/scale/scaleclireference/filesystem/): Introduces the TrueNAS CLI filesystem namespace, used to access the acltemplate child namespace.
- [Network](https://www.truenas.com/docs/scale/scaleclireference/network/): Introduces the TrueNAS CLI network namespace and provides access to child namespaces and commands used to configure network settings.
- [Service](https://www.truenas.com/docs/scale/scaleclireference/service/): Introduces the TrueNAS CLI service namespace and provides access to child namespaces and commands including cluster, ctdb, ftp, gluster, ipmi, nfs, smart, smb, snmp, ssh, and vm.
- [Sharing](https://www.truenas.com/docs/scale/scaleclireference/sharing/): Introduces the TrueNAS CLI sharing namespace and provides access to child namespaces and commands including iscsi, nfs, and smb.
- [Storage](https://www.truenas.com/docs/scale/scaleclireference/storage/): Introduces the TrueNAS CLI storage namespace and provides access to child namespaces and commands including dataset, disk, enclosure, filesystem, pool, resilver, scrub, snapshot, and vmware.
- [System](https://www.truenas.com/docs/scale/scaleclireference/system/): Introduces the TrueNAS CLI system namespace that configures system related settings found in the API and web UI.
- [Task](https://www.truenas.com/docs/scale/scaleclireference/task/): Introduces the TrueNAS CLI task namespace and provides access to child namespaces and commands including cloud\_sync, cron\_job, replication, rsync, smart\_test, and snapshot.