How to install dictionaries in Linux Terminal

A locally stored dictionary utility can really be useful when no other dictionary is available. There are many options in the Linux software world. Among these, there is an option that runs fairly 'smoothly' from the system terminal, called SDCV.

Learning new words can be a difficult process. Thankfully, the Internet has many powerful tools that streamline such processes. Even Google gives you the definition of the word right in the search results. However, even Google can't help when you're stuck offline.

A locally stored dictionary utility can really be useful when no other dictionary is available (even if it exists). There are many options in the Linux software world. Among these, there is an option that runs fairly 'smoothly' from the system terminal, called SDCV.

What is SDCV?

SDCV is a command line version of the popular StarDict extended GUI dictionary application. SDCV stands for StarDict Console Version. StarDict itself runs on all major operating systems, including Windows, BSD and Linux.

What makes StarDict and SDCV so special is that there is a large collection of dictionary files to combine with its lookup function. For advanced users, the option to manually create a dictionary is also available.

In addition to the potential to search multiple dictionaries simultaneously, SDCV also benefits from configurable search patterns.

Install SDCV

Installing SDCV is very simple in Ubuntu with the apt utility and it is also available in the Debian archive. Here is the command to install SDCV in Ubuntu:

 sudo apt-get install sdcv 
Picture 1 of How to install dictionaries in Linux Terminal
Install SDCV

Once installed, SDCV can be called, but there is nothing to offer if no dictionary has been installed.

Install the dictionary file

First, you'll need to find a dictionary file that SDCV can handle (DICT format). Fortunately, there are some great options linked in the StarDict homepage.

The article will use the Collaborative International Dictionary of English for this example.

This file is compressed as a tarball. You need to extract it and put it in the right directory for SDCV to recognize it. The following code snippet accomplishes both tasks at once:

 sudo tar -xjvf YOURFILEGOESHERE -C /usr/share/stardict/dic 
Picture 2 of How to install dictionaries in Linux Terminal
Install the dictionary file

To use the code above, replace 'YOURFILEGOESHERE' with the full name and extension of the tar file you downloaded. The command will extract the files contained in the shared dictionary directory of SDCV and StarDict at / usr / share / stardict / dic.

Run the search

Now, you can run SDCV from the terminal with the following command (change 'WORD' to the word you want to look up):

 sdcv WORD 
Picture 3 of How to install dictionaries in Linux Terminal
Run the search

If SDCV offers many options, you can specify what you are interested in by selecting its number.

Picture 4 of How to install dictionaries in Linux Terminal
Specify options by selecting a number

Wikit

As a useful complement to SDCV, you can also use another command-line tool for information queries called Wikit.

Wikit allows you to quickly search Wikipedia from the terminal and view summaries for any terms contained in this community-maintained encyclopedia.

Note : Wikit requires Node.js (and npm) to be installed on the system and not work offline. To install Node.js and npm for Ubuntu, use the following code:

 https://deb.nodesource.com/setup_12.x | sudo -E bash - sudo apt-get install -y nodejs 
Picture 5 of How to install dictionaries in Linux Terminal
Wikit requires Node.js and npm

To install Wikit, just use the following command:

 npm i wikit -g 
Picture 6 of How to install dictionaries in Linux Terminal
Install Wikit

Once you have Wikit installed, you can call it with the following command (change SEARCH_PHRASE to your own search terms):

 wikit SEARCH_PHRASE 
Picture 7 of How to install dictionaries in Linux Terminal
Call Wikit

With SDCV and Wikit, you can quickly find information and definitions for almost anything. Try adding additional dictionary files to your SDCV library for a broad offline search!

Update 30 March 2020
Category

System

Mac OS X

Hardware

Game

Tech info

Technology

Science

Life

Application

Electric

Program

Mobile