We all end up looking for a dictionary every now and then. Online dictionaries and Wikipedia are great tools, but we are not always connected to the web. Moreover most Linux power users would rather prefer the terminal over anything else . sdcv is a console version of StarDict dictionary. Using sdcv you can search for definitions while still offline. This app comes pre installed in many Linux distributions. If not, then dont worry. We will help you in installing the same.
How to Instal SDCV in Ubuntu
To install it on Ubuntu , go to the terminal and type
sudo apt-get install sdvc
You can directly install it through ubuntu apt repository.
On Fedora simply install the same using
su -c “yum install sdvc”.
After installing SDCV, we need to download the dictionary files from the web. Thes files acts as a source of offline content so this step is vital if you want to browse the dictionary offline.
Go to http://abloz.com/huzheng/stardict-dic/dict.org/ , http://abloz.com/huzheng/stardict-dic/misc/ and download dictionary files according to you requirements. For FOSS fans, Free On-Line Dictionary of Computing (FOLDOC) and Jargon file are two must haves. They are both available from http://abloz.com/huzheng/stardict-dic/dict.org/. FOLDOC is a Dictionary for computing subjects and Jargon File is a dictionary full of terms used by hackers.
The GNU/Linux English-English Dictionary is another must have if you want to have a fully capable dictionary.
Installing the downloaded Dictionary Files
Now that you have downloaded the dictionary files we need to put them in the folder where sdcv looks for dictionary files when it is invoked.
We need to create a directory using
$sudo mkdir /usr/share/stardict/dic/
Now we need to unpack the archived dictionary files and copy them to the new folder using
$sudo tar -xvjf downloaded.tar.bz2 -C /usr/share/stardict/dic
$sudo tar -xvzf downlaoded.tar.gz -C /usr/share/stardict/dic
Note: Make sure the user who will be invoking the sdcv command has read and execute permissions on /usr/share/stardict/dic/ and its subfolders.
Searching for definition
$ sdcv Linux (looks for linux in the dictionary.)
$ sdcv (invoes sdcv in the interactive mode, press Control-D to quit).
You can use espeak utility in Linux for text to speech processes. So you can combine the both to look for definition and its for pronunciation.
$ sdcv Linux && espeak Linux
Note: Sometimes due to the long definition of a particular word text scrolls down too fast for you to read, advanced users can set SDCV_PAGER environment variable to /usr/bin/less. Now, less will be used to display to the dictionary’s article. You may consider adding this to your .bashrc file. Check out manpage for sdcv for more information.