TrueNAS SCALETrueNAS SCALE Version Documentation
This content follows the TrueNAS SCALE 23.10 (Cobia) releases. Use the Product and Version selectors above to view content specific to different TrueNAS software or major version.

DNS

  2 minute read.

Last Modified 2024-03-19 08:38 EDT

The SCALE CLI guide 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!

DNS Commands

The dns namespace has one command that is based on functions found in the SCALE API and web UI. It displays the current DNS nameserver IP addresses configured on the system.

You can enter commands from the main CLI prompt or from a network namespace prompt.

Query Command

The query command returns the results of the query-filter and query-option for the dns namespace.

Enter as either a simple command to display the current DNS nameserver IP addresses configured on the system, or enter a command string to customize the output returned.

Run a simple dns command by pressing Enter after entering query. The dns query command returns the current DNS nameserver IP addresses configured on the system.

To enter a string and define additional parameters, enter the query command and press space to see the autofill namespace option. Press space again to see additional autofill argument options. Entering the string customizes the information the query command returns.

From the CLI prompt, enter:

network dns query

Returns the system nameserver IP addresses.

From the network prompt, enter:

dns query

network dns query
+-------------+
| nameserver  |
+-------------+
| 10.123.0.45 |
| 10.123.0.46 |
| 10.123.45.1 |
+-------------+

Related CLI Network Articles