How to install dictionaries in Linux Terminal
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
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
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
Run the search If SDCV offers many options, you can specify what you are interested in by selecting its number.
Specify options by selecting a numberWikit
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
Wikit requires Node.js and npm To install Wikit, just use the following command:
npm i wikit -g
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
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!
You should read it
- Top 7 best Linux terminal emulators
- How to install Hyper Terminal in Ubuntu 20.04
- How to use Guake Terminal in Linux
- 5 interesting entertainment games in Linux Terminal
- How to run 2 or more Terminal commands at the same time on Linux
- How to back up and restore Linux Terminal history
- How to fix the problem of being unable to enter Terminal in Linux
- 6 interesting terminal commands on Mac
- How to play Game Boy games on Linux Terminal
- How to use Linux Terminal as a computer
- 8 best free Terminal Emulator apps for Android
- How to check the dictionary on Coc Coc