Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Is there any command line offline dictionary? I know that there are some like StarDict and Artha but how about one in the command line?

Also, I tried dict but it is an online dictionary.

share|improve this question

3 Answers 3

up vote 23 down vote accepted

sdcv is the console version of Stardict.

1. Install the dictionary

Run the following command in the terminal:

sudo apt-get install sdcv

2. Download dictionary files

Download the dictionary files according to your requirements from the following sources.

3. Install downloaded dictionaries

Make the directory where sdcv looks for the dictionary:

sudo mkdir -p /usr/share/stardict/dic/

The next command depends on whether the downloaded file is a .gz file or a .bz2 file.

If it is a .bz2 file:

sudo tar -xvjf downloaded.tar.bz2 -C /usr/share/stardict/dic

If it is a .gz file:

sudo tar -xvzf downlaoded.tar.gz -C /usr/share/stardict/dic

4. Done!

To search for a word use:

sdcv word

enter image description here

share|improve this answer
    
Marked and also +1 for the installation guide –  PALEN Sep 21 '12 at 14:51
    
That's amazing. Thanks for the informational answer! –  SirCharlo Sep 21 '12 at 15:28
    
glad it helped :) –  green7 Sep 21 '12 at 17:01

You probably also have aspell installed, which has the advantage of giving suggestions for misspelled words. You can call aspell directly on your text, with

aspell check text.txt,

or use it on a single word:

echo wrd | aspell -a
share|improve this answer

If you're just looking to see if a word is spelled correctly or exists, you can use grep to look through the word list files in /usr/share/dict/, which are provided by the appropriate wordlist packages. An example to see if "emu" is a valid word:

grep -i "^emu$" /usr/share/dict/american-english

That doesn't have any definitions, however.

share|improve this answer
    
Actually, I'm looking for definitions... –  PALEN Sep 20 '12 at 22:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.