Sortix
Sortix Download Manual Development Source Code News Blog More
current nightly

Sortix volatile manual

This manual documents Sortix volatile, a development build that has not been officially released. You can instead view this document in the latest official manual.

DNSCONFIG(8) System Manager's Manual DNSCONFIG(8)

NAME

dnsconfig — configure kernel DNS resolver list

SYNOPSIS

dnsconfig

dnsconfig resolver ...

dnsconfig -s [resolver ...]

dnsconfig -a [resolver ...]

dnsconfig -d [resolver ...]

DESCRIPTION

dnsconfig writes the current kernel DNS resolver list, or modifies it if any resolvers are specified.

The options are as follows:

-a
Append resolvers to the list.
-d
Delete resolvers from the list.
-s
Set the resolver list. This option is the default if dnsconfig is invoked with any resolvers.

EXIT STATUS

dnsconfig will exit 0 on success and non-zero otherwise.

EXAMPLES

Get the resolvers:

$ dnsconfig
192.0.2.1

Set two resolvers:

# dnsconfig 192.0.2.15 192.0.2.100
# dnsconfig
192.0.2.15
192.0.2.100

Set the resolvers to the empty list:

# dnsconfig -s
# dnsconfig

Append a resolver:

# dnsconfig 192.0.2.128
# dnsconfig -a 192.0.2.40
# dnsconfig
192.0.2.128
192.0.2.40

Delete a resolver:

# dnsconfig -d 192.0.2.128
# dnsconfig
192.0.2.40

SEE ALSO

getdnsconfig(2), setdnsconfig(2), inet(4), dhclient(8), ifconfig(8)

HISTORY

dnsconfig originally appeared in Sortix 1.1.

CAVEATS

The kernel DNS resolver list is global state. Changes made with dnsconfig may be overwritten by other programs. In particular dhclient(8) sets the resolver list automatically unless otherwise configured.

October 7, 2021 Sortix 1.1.0-dev
Copyright 2011-2025 Jonas 'Sortie' Termansen and contributors.
Sortix's source code is free software under the ISC license.
#sortix on irc.sortix.org
@sortix_org