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] -f <file>
dict [options] -s
dict [options] -D <database>
dict [options] -M <strategy>
dict [options] -I
dict [options] -S
dict [options] -V
dict [options] -H
PARAMETERS
-h
Specifies the DICT server hostname or IP address to connect to.
-p
Specifies the port number on the server to connect to. Default is 2628.
-d
Specifies which dictionary database to search. Use `*` to search all available databases.
-m
Sets the matching strategy for the lookup (e.g., exact, soundex, levenshtein).
-L, --list-databases
Lists all dictionary databases available on the connected server.
-S, --list-strategies
Lists all matching strategies supported by the connected server.
-f
Reads a list of words to look up from the specified file, one word per line.
-s, --servers
Displays the list of default DICT servers configured in the system.
DESCRIPTION
The dict command is a client for the DICT protocol, specified in RFC 2229. It allows users to query network-based dictionary servers for definitions, word lists, and other lexical information.
This utility is commonly used to look up word definitions directly from the command line, often connecting to public DICT servers available on the internet. It supports various dictionary databases on the server, and users can specify which databases to search or search all available ones. Beyond simple definitions, dict can also perform "match" operations to find words similar to a pattern, or retrieve server information.
The command is versatile, allowing for both direct word lookups and more advanced queries, making it a powerful tool for linguists, writers, or anyone needing quick access to lexical data. It typically operates on port 2628 by default, connecting to the server to send queries and display the received definitions or information.
CAVEATS
The dict command is a client-side utility and requires a running DICT server to function. Its utility and the quality of definitions are entirely dependent on the availability and content of the connected server. Network connectivity is essential for querying remote servers, and some public servers may have usage policies or rate limits.
COMMON USAGE EXAMPLE
To look up a word, simply type dict word. For example, to find the definition of 'ubiquitous':
dict ubiquitous
To list all databases on a specific server:
dict -h dict.org -L
To search for words matching a pattern (e.g., words starting with 'tele') using a specific strategy:
dict -m prefix -d * tele
HISTORY
The DICT protocol was designed in the late 1990s as a standardized way to access dictionary data over the internet, inspired by the success of protocols like HTTP and FTP. RFC 2229, which defines the DICT protocol, was published in September 1997. The dict command-line client was developed as part of the initial implementation efforts to provide an easy way to interact with these servers. It became a standard utility in many Unix-like operating systems for its simplicity and efficiency in querying lexical data over a dedicated protocol, contrasting with less structured web-scraping methods.