dict
Look up word definitions in dictionaries
TLDR
List available databases
Get information about a database
Look up a word in a specific database
Look up a word in all available databases
Show information about the DICT server
SYNOPSIS
dict [options] word...
dict [options] !server-command
PARAMETERS
-d, --define DICT
Use specific dictionary/database (e.g., wn, gcide)
-h, --host HOST
Connect to server host (default: dict.org)
-p, --port PORT
Use port number (default: 2628)
-s, --strategy STRAT
Search strategy (e.g., .*, ^.*, lev, soundex)
-m, --match METHOD
Matching method (e.g., exact, prefix, regex, soundex)
-a, --auth USER:PASS
Authenticate with username:password
-c, --config
Print client configuration details
-C, --color[=WHEN]
Enable color output (auto, never, always)
-D, --debug[=LEVEL]
Enable debug output
--config-dir DIR
Configuration directory
-v, --version
Display version info
-?, --help
Show help
DESCRIPTION
The dict command is a client for querying dictionary servers over the network using the DICT protocol (RFC 2229). It allows users to look up word definitions, synonyms, and more from remote databases like gcide, wn (WordNet), or jargon.
By default, it connects to dict.org on port 2628. Users specify words or server commands (prefixed with !, e.g., !help). It supports multiple search strategies such as exact match, prefix, substring, Levenshtein distance, or soundex for fuzzy matching.
Results display the database source, definition, and metadata. Authentication is available for private servers. Configuration can be customized via /usr/lib/dict.conf or ~/.dict.conf, listing preferred hosts, ports, and strategies.
Ideal for terminal-based lookups, scripting, or integration in tools needing lexical data. It handles multiple words or piped input efficiently.
CAVEATS
Requires network access to a DICT server; default dict.org may be slow or unavailable. No offline mode without local dictd server. Large results truncated unless piped. IPv6 support varies by build.
COMMON STRATEGIES
.*: substring match
^.*: prefix
.lev: Levenshtein (edit distance)
.soundex: phonetic
COMMON DATABASES
gcide: GNU Collaborative Dictionary
wn: WordNet
jargon: Hacker Jargon
moby-thes: Thesaurus
Use dict -D or !show db for list.
HISTORY
Developed as part of the GNU Dict Client project (1990s), implementing DICT protocol from RFC 2229 (1997) by P. Cassagrande. Popularized with dict.org service (1995). Maintained in Linux distros via dict-client package; recent versions add color and IPv6.


