DICT(1)
๐ DICT(1) โ like, the manual page, but make it make sense ๐
okay bestie, gather round, because today we're talking about dict, the DICT Protocol Client โจ (yes that's the official NAME, and yes it eats, we don't make the rules)
โจ SYNOPSIS โจ
the vibe, in code form ๐ซถ
dict word
dict [options] [word]
dict [options] dict://host:port/d:word:database
dict [options] dict://host:port/m:word:database:strategy
๐ธ DESCRIPTION ๐ธ
so basically dict is a client for the Dictionary Server Protocol (DICT), which is a TCP transaction based query/response protocol that hands you access to dictionary definitions from a whole set of natural language dictionary databases. iconic behaviour honestly ๐
exit status is 0 if the operation succeeded, or non-zero otherwise. no cap. and if you wanna know the non-zero ones by heart, go peek at EXIT STATUS below ๐
๐ OPTIONS ๐
one bullet per flag, every single one, we do not skip ๐
-hserver or--hostserver โ tells it the hostname for the DICT server. server/port combos can also live in the configuration file. if there are no servers in the config file or on the command line,dictwill fail, periodt. and if the IP lookup for a server expands into a list of IP addresses (likedict.orgdoes currently), then each IP gets tried in the order listed. slay ๐ฅ-pservice or--portservice โ picks the port (e.g.2628) or service (e.g.dict) for connections. the default is2628, as specified in the DICT Protocol RFC. server/port combos can also be specified in the configuration file.-ddbname or--databasedbname โ says "search this one specific database". default is to search all databases (a"*"from the DICT protocol). heads up though: a"!"in the DICT protocol means search all of the databases until a match is found, and then stop searching. important distinction bestie ๐-mor--matchโ instead of printing a definition, it performs a match using the specified strategy.-sstrategy or--strategystrategy โ specify a matching strategy. by default the server default match strategy is used, which is usually"exact"for definitions, and some form of spelling-correction strategy for matches ("."from the DICT protocol). which strategies even exist depends on the server implementation. for a list of available strategies, see the-Sor--stratsoption ๐-Cor--nocorrectโ usually, if a definition is requested and the word cannot be found, spelling correction is requested from the server, and a list of possible words is provided. this option disables the generation of that list. sometimes you just don't wanna be corrected, iykyk ๐-cfile or--configfile โ specify the configuration file. the default is to try~/.dictrcand/etc/dict.conf, using the first file that exists. if a specific configuration file is specified, then the defaults will not be tried. (so don't be out here expecting a fallback, because there isn't one ๐ซ )-Dor--dbsโ query the server and display a list of available databases.-Sor--stratsโ query the server and display a list of available search strategies.-Hor--serverhelpโ query the server and display the help information that it provides. it's giving customer service โจ-idbname or--infodbname โ request information on the specified database (usually the server will provide origination, descriptive, or other information about the database or its contents).-Ior--serverinfoโ query the server and display information about the server itself.-Mor--mimeโ send theOPTION MIMEcommand to the server.
NOTE: the server's capabilities are not checked. (yes this is also a BUGS entry, it's just that important ๐)
-for--formattedโ enables formatted output, i.e. output convenient for postprocessing by standard UNIX utilities. no, it is not XML ;-) also, error and warning messages like" No matches..."," Invalid strategy..."etc. are sent tostderr, not tostdout. the format is:
-I, -i, -H and similar:
host<TAB>port
<SPC><SPC>line1
<SPC><SPC>line2
...
-S:
host<TAB>port<TAB>strategy1<TAB>short description1
host<TAB>port<TAB>strategy2<TAB>short description2
...
-D:
host<TAB>port<TAB>database1<TAB>database description1
host<TAB>port<TAB>database2<TAB>database description2
...
-m:
host<TAB>port<TAB>database1<TAB>match1
host<TAB>port<TAB>database2<TAB>match2
...
-aor--noauthโ disable authentication (i.e., don't send anAUTHcommand). just walk in like you own the place ๐-uuser or--useruser โ specifies the username for authentication.-kkey or--keykey โ specifies the shared secret for authentication. ๐คซ-Vor--versionโ display version information.-Lor--licenseโ display copyright and license information. the legal girlies love this one ๐-4โ forcesdictto use IPv4 addresses only.-6โ forcesdictto use IPv6 addresses only.--helpโ display help information.-vor--verboseโ be verbose.-ror--rawโ be very verbose: show the raw client/server interaction. the way that it just tells you everything ๐ฅ--pipesizeโ specify the buffer size for pipelineing commands. the default is256, which should be sufficient for general tasks and be below the MTU for most transport media. larger values may provide faster or slower throughput, depending on MTU. if the buffer is too small, requests will be serialized. values less than0and greater than one million are silently changed to something more reasonable. (silently. no warning. just vibes ๐ญ)--clienttext โ specifies additional text to be sent using theCLIENTcommand.--debugflag โ set a debugging flag. valid flags are:verboseโ the same as-vor--verbose.rawโ the same as-ror--raw.scanโ debug the scanner for the configuration file.parseโ debug the parser for the configuration file.pipeโ debug TCP pipelining support (see the DICT RFC andRFC1854).serialโ disable pipelining support.timeโ perform transaction timing. โฑ๏ธ
๐ CONFIGURATION ๐
the configuration file currently has a very simple format. lines are used to specify servers, for example:
server dict.org
or, with options:
server dict.org { port 8080 }
server dict.org { user username secret }
server dict.org { port dict user username secret }
the port and user options may be specified in any order. the port option is used to specify an optional port (e.g. 2628) or service (e.g. dict) for the TCP/IP connection. the user option is used to specify a username and shared secret to be used for authentication to this particular server.
servers are tried in the order listed until a connection is made. first come, first served bestie ๐ซถ
๐ EXIT STATUS ๐
here's the full list, and yes, they all matter:
0โ Successful completion20โ No matches found21โ Approximate matches found22โ No databases available23โ No strategies available30โ Unexpected response code from server31โ Server is temporarily unavailable32โ Server is shutting down33โ Syntax error, command not recognized34โ Syntax error, illegal parameters35โ Command not implemented36โ Command parameter not implemented37โ Access denied38โ Authentication failed39โ Invalid database40โ Invalid strategy41โ Connection to server failed
๐ CREDITS ๐
dict was written by Rik Faith (faith@cs.unc.edu) and is distributed under the terms of the GNU General Public License. if you need to distribute under other terms, write to the author. โ๏ธ
the main libraries used by this programs (zlib, regex, libmaa) are distributed under different terms, so you may be able to use the libraries for applications which are incompatible with the GPL โ please see the copyright notices and license information that come with the libraries for more information, and consult with your attorney to resolve these issues. (yes, an actual attorney. not me. I'm just a manpage ๐
)
๐ญ BUGS ๐ญ
we're being honest here, bestie, because that's what friends do:
- if a
dict:URL is given on the command line, only the first one is used. the rest are ignored. gone. ghosted. - if a
dict:URL contains a specifier for the nth definition or match of a word, it will be ignored and all the definitions or matches will be provided. this violates the RFC, and will be corrected in a future release. - if a
dict:URL contains a shared secret, it will not be parsed correctly. - when the
OPTION MIMEcommand is sent to the server (the-Moption), server's capabilities are not checked.
๐ฆ FILES ๐ฆ
~/.dictrcโ User'sdictconfiguration file/etc/dict.confโ Systemdictconfiguration file
โญ SEE ALSO โญ
dictd(8), dictzip(1), http://www.dict.org, RFC 2229
and that's the whole page, bestie!! ๐ this iconic little manual is dated 15 February 1998 and lives as DICT(1) โ go forth, look up words, and be the main character of your own terminal ๐ธ๐
๐ฆ where this page comes from
- fedora 43: dictd 1.13.3-2.fc43 ยท GPL-2.0-only AND GPL-2.0-or-later AND GPL-1.0-or-later AND GPL-3.0-or-later AND MIT AND BSD-3-Clause AND LicenseRef-Fedora-Public-Domain
- fedora 44: dictd 1.13.3-5.fc44 ยท GPL-2.0-only AND GPL-2.0-or-later AND GPL-1.0-or-later AND GPL-3.0-or-later AND MIT AND BSD-3-Clause AND LicenseRef-Fedora-Public-Domain
- nixos 26.05: dictd 1.13.3
- nixpkgs unstable: dictd 1.13.3
- opensuse-leap 16.0: dictd 1.13.1-bp160.1.12 ยท BSD-3-Clause AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND MIT AND SUSE-Public-Domain
- opensuse-leap 16.0: dictd 1.13.1-bp160.1.12 ยท BSD-3-Clause AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND MIT AND SUSE-Public-Domain
- opensuse-leap 16.0: dictd 1.13.1-bp160.1.12 ยท BSD-3-Clause AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND MIT AND SUSE-Public-Domain
- opensuse-leap 16.0: dictd 1.13.1-bp160.1.12 ยท BSD-3-Clause AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND MIT AND SUSE-Public-Domain
- Copyright 1997, 1998, 1999, 2002 Rickard E. Faith (faith@acm.org)
- Copyright 2002-2008 Aleksey Cheusov (vle@gmx.net)
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms