Learning new words can be a pain when you’re pressed for time and the pages of a dictionary can only be flipped so fast. Thankfully, the Internet has placed a lot of powerful tools at your fingertips to help streamline such processes. After all, Google gives you word definitions right in its search results these days. However, even Google can’t help you when you’re stuck writing offline.
A locally stored dictionary utility can really come in handy when no other dictionary is available (or even when there is!), and options abound in the world of Linux software. Among these, there is one that runs quite nicely from your system’s terminal, and it’s called SDCV.
What Is SDCV?
SDCV is the command-line version of the popular StarDict extensible GUI dictionary application. The name stands for “StarDict Console Version.” StarDict itself runs on all major operating systems, including Windows, BSD and Linux variants.
What makes StarDict special also makes SDCV special – the availability of a vast assortment of dictionary files to incorporate into its lookup function. For the savvy, the option of handcrafting a dictionary is available as well.
In addition to the potential for simultaneous searching of multiple dictionaries at once, SDCV also benefits from configurable search patterns. We’ll take a look at the process for installing it and your first dictionary file below.
Installing SDCV is straightforward in Ubuntu with the apt utility, and it is available in Debian’s repositories as well. Here’s the command for installation in Ubuntu:
Once installed, SDCV can be called, but it won’t have anything to offer as we haven’t installed any dictionaries yet.
Install a Dictionary File
First, we’ll need to find a dictionary file that SDCV can handle (DICT format). Luckily, there are some great ones linked in StarDict’s homepage.
We’ll use the Collaborative International Dictionary of English for this example.
This file comes compressed as a tarball. We’ll need to uncompress it and place it in the right directory for SDCV to recognize it. The following code accomplishes both at once:
To use the code above, replace “YOURFILEGOESHERE” with the full name and extension of your downloaded tar file. The command will extract the files contained inside to SDCV and StarDict’s shared dictionary folder at “/usr/share/stardict/dic.”
Run a Search
Now you can run SDCV from your terminal with the following command (changing “WORD” to the word you want to look up):
If SDCV comes up with multiple options for you to choose from, you can specify which you are interested in by selecting its number.
As a helpful addition to SDCV, you can also make use of another command-line tool for informational queries called “Wikit.”
Wikit allows you to quickly search Wikipedia from your terminal and see a synopsis for any term covered by the world’s community-maintained encyclopedia.
Note: Wikit requires Node.js (and npm) to be installed on your system as well and does not work offline. To install Node.js and npm for Ubuntu, use the following code:
To install Wikit, just use the following command:
Once you have installed Wikit, you can call it with the following command (change “SEARCH_PHRASE” to your own search phrase):
With SDCV and Wikit, you can quickly find information and definitions for pretty much anything. Try adding additional dictionary files to your SDCV library for more extensive offline searches.
Our latest tutorials delivered straight to your inbox