Back in the old country, I had several physical dictionaries within reach of the desk at which I wrote. You know, for those times when I need to find or look up a word and not just because I thought they looked kind of impressive.
When I moved overseas, those dictionaries went to new homes. Since then, I haven’t replaced those tomes. When I need a dictionary, I turn to the Linux command line and use dict. And, no, doing that isn’t as geeky or techie as it seems.
Let’s take a quick look at using dict to look up new and unfamiliar words.
You can quickly install dict with a desktop package manager like Synaptic. But that’s not the only way to do the deed. You can also install it from the command line — it is a command line application after all …
If you’re using a Linux distribution based on Debian (like Ubuntu, Linux Mint, or Zorin OS) you can install dict in a terminal window using this command:
sudo apt install dict
If you’re not using a distribution based on Debian, try using your distro’s equivalent command — for example, pacman on Arch Linux or dnf on Fedora.
When you need to find the meaning of a word, crack open a terminal window, then type
dict [word] — for example:
Here’s the result:
dict’s results often go beyond the bottom of a terminal window. To get around that, you can add | more after the command like this:
dict woolgathering | more
Here’s the result:
Adding | more breaks the results up. You can move to the next page or pages by pressing the Space bar on your keyboard.
You can also get the definition of a phrase by surrounding the words that make up the phrase with quotation marks. For example, to look up the meaning of free software, type:
dict "free software"
Using Other Dictionaries
When you ask dict to look up a word, it turns to one or a small handful of its available dictionaries. The dictionaries that the application chooses is based on the context of the word or phrase that you enter. For example, if you enter a more archaic word, dict will scour the older dictionaries at its disposal.
But those dictionaries aren’t your only choices. You can focus your look up on a single dictionary. dict gives you access to a number of dictionaries — some general purpose, some specialized, and a few for foreign languages.
You can view the available dictionaries by typing:
dict -D | more
Which looks like this:
Let’s say you want to look up a word or phrase using The Free On-line Dictionary of Computing. To do that, type:
dict -d foldoc [word or phrase]
dict -d foldoc "open source license"
Which returns this:
There’s a lot more that you can do with dict. What I’ve outlined in the previous few hundred words is how I use dict. Your mileage may vary.
That said, even though dict is a command line utility, it’s not overly techie. It’s easy to use and it’s useful. On top of that, it saves me time when I need to look up a word or two.