{
    "mode": "man",
    "parameter": "dict",
    "section": "host",
    "url": "https://www.chedong.com/phpMan.php/man/dict/host/json",
    "generated": "2026-06-17T16:07:53Z",
    "synopsis": "host  [-aACdlnrsTUwv]  [-c  class]  [-N  ndots] [-p port] [-R number] [-t type] [-W wait] [-m\nflag] [ [-4] | [-6] ] [-v] [-V] {name} [server]",
    "sections": {
        "NAME": {
            "content": "dict - DICT Protocol Client\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "dict word\ndict [options] [word]\ndict [options] dict://host:port/d:word:database\ndict [options] dict://host:port/m:word:database:strategy\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "dict is a client for the Dictionary Server Protocol (DICT), a TCP transaction based query/re‐\nsponse protocol that provides access to dictionary definitions from a set of natural language\ndictionary databases.  Exit status is 0 if operation succeeded, or non-zero otherwise.\nSee EXIT STATUS section.\n\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-h --host",
                    "content": "Specifies the hostname for the DICT server.  Server/port combinations can be specified\nin the configuration file.  If no servers are specified in the configuration  file  or\non  the  command line, dict will fail.  If IP lookup for a server expands to a list of\nIP addresses (as dict.org does currently), then each IP will be  tried  in  the  order\nlisted.\n",
                    "flag": "-h",
                    "long": "--host"
                },
                {
                    "name": "-p --port",
                    "content": "Specifies  the port (e.g., 2628) or service (e.g., dict) for connections.  The default\nis 2628, as specified in the DICT Protocol RFC.  Server/port combinations can be spec‐\nified in the configuration file.\n",
                    "flag": "-p",
                    "long": "--port"
                },
                {
                    "name": "-d --database",
                    "content": "Specifies  a  specific  database to search.  The default is to search all databases (a\n\"*\" from the DICT protocol).  Note that a \"!\" in the DICT protocol means to search all\nof the databases until a match is found, and then stop searching.\n",
                    "flag": "-d",
                    "long": "--database"
                },
                {
                    "name": "-m --match",
                    "content": "Instead of printing a definition, perform a match using the specified strategy.\n",
                    "flag": "-m",
                    "long": "--match"
                },
                {
                    "name": "-s --strategy",
                    "content": "Specify  a  matching strategy.  By default, the server default match strategy is used.\nThis is usually \"exact\" for definitions, and some form of spelling-correction strategy\nfor  matches  (\".\" from the DICT protocol).  The available strategies are dependent on\nthe server implementation.  For a list of available strategies, see the -S or --strats\noption.\n",
                    "flag": "-s",
                    "long": "--strategy"
                },
                {
                    "name": "-C --nocorrect",
                    "content": "Usually,  if  a definition is requested and the word cannot be found, spelling correc‐\ntion is requested from the server, and a list of possible words  are  provided.   This\noption disables the generation of this list.\n",
                    "flag": "-C",
                    "long": "--nocorrect"
                },
                {
                    "name": "-c --config",
                    "content": "Specify   the   configuration   file.    The   default   is   to   try  ~/.dictrc  and\n/etc/dictd/dict.conf, using the first file that exists.  If a  specific  configuration\nfile is specified, then the defaults will not be tried.\n",
                    "flag": "-c",
                    "long": "--config"
                },
                {
                    "name": "-D --dbs",
                    "content": "Query the server and display a list of available databases.\n",
                    "flag": "-D",
                    "long": "--dbs"
                },
                {
                    "name": "-S --strats",
                    "content": "Query the server and display a list of available search strategies.\n",
                    "flag": "-S",
                    "long": "--strats"
                },
                {
                    "name": "-H --serverhelp",
                    "content": "Query the server and display the help information that it provides.\n",
                    "flag": "-H",
                    "long": "--serverhelp"
                },
                {
                    "name": "-i --info",
                    "content": "Request  information on the specified database (usually the server will provide origi‐\nnation, descriptive, or other information about the database or its contents).\n",
                    "flag": "-i",
                    "long": "--info"
                },
                {
                    "name": "-I --serverinfo",
                    "content": "Query the server and display information about the server.\n",
                    "flag": "-I",
                    "long": "--serverinfo"
                },
                {
                    "name": "-M --mime",
                    "content": "Send OPTION MIME command to the server.\nNOTE: Server's capabilities are not checked.\n\n",
                    "flag": "-M",
                    "long": "--mime"
                },
                {
                    "name": "-f --formatted",
                    "content": "Enables formatted output, i.e. output convenient for postprocessing by  standard  UNIX\nutilities. No, it is not XML ;-) Also error and warning messages like\n\" No matches...\", \" Invalid strategy...\" etc. are sent to stderr, not to stdout.\nFormat:\n-I, -i, -H and similar:\nhost<TAB>port\n<SPC><SPC>line1\n<SPC><SPC>line2\n...\n-S:\nhost<TAB>port<TAB>strategy1<TAB>short description1\nhost<TAB>port<TAB>strategy2<TAB>short description2\n...\n-D:\nhost<TAB>port<TAB>database1<TAB>database description1\nhost<TAB>port<TAB>database2<TAB>database description2\n...\n-m:\nhost<TAB>port<TAB>database1<TAB>match1\nhost<TAB>port<TAB>database2<TAB>match2\n...\n\n",
                    "flag": "-f",
                    "long": "--formatted"
                },
                {
                    "name": "-a --noauth",
                    "content": "Disable authentication (i.e., don't send an AUTH command).\n",
                    "flag": "-a",
                    "long": "--noauth"
                },
                {
                    "name": "-u --user",
                    "content": "Specifies the username for authentication.\n",
                    "flag": "-u",
                    "long": "--user"
                },
                {
                    "name": "-k --key",
                    "content": "Specifies the shared secret for authentication.\n",
                    "flag": "-k",
                    "long": "--key"
                },
                {
                    "name": "-V --version",
                    "content": "Display version information.\n",
                    "flag": "-V",
                    "long": "--version"
                },
                {
                    "name": "-L --license",
                    "content": "Display copyright and license information.\n",
                    "flag": "-L",
                    "long": "--license"
                },
                {
                    "name": "-4",
                    "content": "",
                    "flag": "-4"
                },
                {
                    "name": "-6",
                    "content": "--help Display help information.\n",
                    "flag": "-6"
                },
                {
                    "name": "-v --verbose",
                    "content": "Be verbose.\n",
                    "flag": "-v",
                    "long": "--verbose"
                },
                {
                    "name": "-r --raw",
                    "content": "Be very verbose: show the raw client/server interaction.\n",
                    "flag": "-r",
                    "long": "--raw"
                },
                {
                    "name": "--pipesize",
                    "content": "Specify the buffer size for pipelineing commands.  The default is 256, which should be\nsufficient for general tasks and be below the MTU for most  transport  media.   Larger\nvalues  may  provide  faster or slower throughput, depending on MTU.  If the buffer is\ntoo small, requests will be serialized.  Values less than 0 and greater than one  mil‐\nlion are silently changed to something more reasonable.\n\n--client text\nSpecifies additional text to be sent using the CLIENT command.\n\n--debug flag\nSet a debugging flag.  Valid flags are:\n\nverbose\nThe same as -v or --verbose.\n\nraw    The same as -r or --raw.\n\nscan   Debug the scanner for the configuration file.\n\nparse  Debug the parser for the configuration file.\n\npipe   Debug TCP pipelining support (see the DICT RFC and RFC1854).\n\nserial Disable pipelining support.\n\ntime   Perform transaction timing.\n",
                    "long": "--pipesize"
                }
            ]
        },
        "IDN SUPPORT": {
            "content": "If host has been built with IDN (internationalized domain name) support, it  can  accept  and\ndisplay  non-ASCII  domain  names. host appropriately converts character encoding of a domain\nname before sending a request to a DNS server or displaying a reply from the server.  To turn\noff  IDN support, define the IDNDISABLE environment variable. IDN support is disabled if the\nvariable is set when host runs.\n",
            "subsections": []
        },
        "FILES": {
            "content": "~/.dictrc\nUser's dict configuration file\n\n/etc/dictd/dict.conf\nSystem dict configuration file\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "dictd(8), dictzip(1), http://www.dict.org, RFC 2229\n\n\n\n15 February 1998                                   DICT(1)",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Internet Systems Consortium\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "2026, Internet Systems Consortium\n\n\n\n\n9.18.39-0ubuntu0.22.04.4-Ubuntu              2025-08-13                                      HOST(1)\nDICT(1)                                                                                      DICT(1)\n\n\n",
            "subsections": []
        },
        "CONFIGURATION": {
            "content": "The  configuration  file  currently  has  a  very  simple  format.  Lines are used to specify\nservers, for example:\nserver dict.org\nor, with options:\nserver dict.org { port 8080 }\nserver dict.org { user username secret }\nserver dict.org { port dict user username secret }\nthe port and user options may be specified in any order.  The port option is used to  specify\nan  optional  port  (e.g., 2628) or service (e.g., dict) for the TCP/IP connection.  The user\noption is used to specify a username and shared secret to be used for authentication to  this\nparticular server.\n\nServers are tried in the order listed until a connection is made.\n",
            "subsections": []
        },
        "EXIT STATUS": {
            "content": "0  Successful completion\n\n20 No matches found\n21 Approximate matches found\n22 No databases available\n23 No strategies available\n\n30 Unexpected response code from server\n31 Server is temporarily unavailable\n32 Server is shutting down\n33 Syntax error, command not recognized\n34 Syntax error, illegal parameters\n35 Command not implemented\n36 Command parameter not implemented\n37 Access denied\n38 Authentication failed\n39 Invalid database\n40 Invalid strategy\n41 Connection to server failed\n\n",
            "subsections": []
        },
        "CREDITS": {
            "content": "dict  was  written  by Rik Faith (faith@cs.unc.edu) and is distributed under the terms of the\nGNU General Public License.  If you need to distribute under other terms, write  to  the  au‐\nthor.\n\nThe  main libraries used by this programs (zlib, regex, libmaa) are distributed under differ‐\nent terms, so you may be able to use the libraries for applications  which  are  incompatible\nwith  the  GPL -- please see the copyright notices and license information that come with the\nlibraries for more information, and consult with your attorney to resolve these issues.\n",
            "subsections": []
        },
        "BUGS": {
            "content": "If a dict: URL is given on the command line, only the first one is used.  The  rest  are  ig‐\nnored.\n\nIf a dict: URL contains a specifier for the nth definition or match of a word, it will be ig‐\nnored and all the definitions or matches will be provided.  This violates the RFC,  and  will\nbe corrected in a future release.\n\nIf a dict: URL contains a shared secret, it will not be parsed correctly.\n\nWhen  OPTION  MIME  command is sent to the server (-M option) , server's capabilities are not\nchecked.\n",
            "subsections": []
        }
    },
    "summary": "host - DNS lookup utility",
    "flags": [
        {
            "flag": "-4",
            "long": null,
            "arg": null,
            "description": "-6 option."
        },
        {
            "flag": "-6",
            "long": null,
            "arg": null,
            "description": "-4 option."
        },
        {
            "flag": "-a",
            "long": null,
            "arg": null,
            "description": "ior of the -l list zone option."
        },
        {
            "flag": "-A",
            "long": null,
            "arg": null,
            "description": "records are omitted from the output."
        },
        {
            "flag": "-c",
            "long": null,
            "arg": null,
            "description": "This option specifies the query class, which can be used to lookup HS (Hesiod) or CH (Chaosnet) class resource records. The default class is IN (Internet)."
        },
        {
            "flag": "-C",
            "long": null,
            "arg": null,
            "description": "the SOA records for zone name from all the listed authoritative name servers for that zone. The list of name servers is defined by the NS records that are found for the zone."
        },
        {
            "flag": "-d",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-l",
            "long": null,
            "arg": null,
            "description": "transfer of zone name and prints out the NS, PTR, and address records (A/AAAA). Together, the -l -a options print all records in the zone."
        },
        {
            "flag": "-N",
            "long": null,
            "arg": null,
            "description": "This option specifies the number of dots (ndots) that have to be in name for it to be considered absolute. The default value is that defined using the ndots statement in /etc/resolv.conf, or 1 if no ndots statement is present. Names with fewer dots are in‐ terpreted as relative names, and are searched for in the domains listed in the search or domain directive in /etc/resolv.conf."
        },
        {
            "flag": "-p",
            "long": null,
            "arg": null,
            "description": "This option specifies the port to query on the server. The default is 53."
        },
        {
            "flag": "-r",
            "long": null,
            "arg": null,
            "description": "sion desired) bit in the query. This means that the name server receiving the query does not attempt to resolve name. The -r option enables host to mimic the behavior of a name server by making non-recursive queries, and expecting to receive answers to those queries that can be referrals to other name servers."
        },
        {
            "flag": "-R",
            "long": null,
            "arg": null,
            "description": "This option specifies the number of retries for UDP queries. If number is negative or zero, the number of retries is silently set to 1. The default value is 1, or the value of the attempts option in /etc/resolv.conf, if set."
        },
        {
            "flag": "-s",
            "long": null,
            "arg": null,
            "description": "sponds with a SERVFAIL response, which is the reverse of normal stub resolver behav‐ ior."
        },
        {
            "flag": "-t",
            "long": null,
            "arg": null,
            "description": "This option specifies the query type. The type argument can be any recognized query type: CNAME, NS, SOA, TXT, DNSKEY, AXFR, etc. When no query type is specified, host automatically selects an appropriate query type. By default, it looks for A, AAAA, and MX records. If the -C option is given, queries are made for SOA records. If name is a dotted-decimal IPv4 address or colon-delimited IPv6 address, host queries for PTR records. If a query type of IXFR is chosen, the starting serial number can be specified by ap‐ pending an equals sign (=), followed by the starting serial number, e.g., -t IXFR=12345678."
        },
        {
            "flag": "-U",
            "long": null,
            "arg": null,
            "description": "-T option makes it use a TCP connection when querying the name server. TCP is automat‐ ically selected for queries that require it, such as zone transfer (AXFR) requests. Type ANY queries default to TCP, but can be forced to use UDP initially via -U."
        },
        {
            "flag": "-m",
            "long": null,
            "arg": null,
            "description": "This option sets memory usage debugging: the flag can be record, usage, or trace. The -m option can be specified more than once to set multiple flags."
        },
        {
            "flag": "-v",
            "long": null,
            "arg": null,
            "description": "output can also be enabled by setting the debug option in /etc/resolv.conf."
        },
        {
            "flag": "-V",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-w",
            "long": null,
            "arg": null,
            "description": "also the -W option."
        },
        {
            "flag": "-W",
            "long": null,
            "arg": null,
            "description": "This options sets the length of the wait timeout, indicating that named should wait for up to wait seconds for a reply. If wait is less than 1, the wait interval is set to 1 second. By default, host waits for 5 seconds for UDP responses and 10 seconds for TCP connec‐ tions. These defaults can be overridden by the timeout option in /etc/resolv.conf. See also the -w option."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "dig",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/dig/1/json"
        },
        {
            "name": "named",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/named/8/json"
        }
    ]
}