Most people query Google when they encounter a word they are not familiar. Or they use a favorite online dictionary to provide answers. What if you have no network connection? Or do you have only one old Linux release and you do not have a GUI? Tag: Linux command if you need to search offline
Most people query Google when they encounter a word they are not familiar. Or they use a favorite online dictionary to provide answers. What if you have no network connection? Or do you have only one old Linux release and you do not have a GUI? If you need to search offline, here is a good method.
First, you need to set dictd locally. Dictd is a dictionary database server. It allows you to access online dictionaries. But wait, aren't we going to use it offline? This is why we want to install it locally. It has a command line client.
To install it on Ubuntu or Debian, enter:
- ___FCKpd___0nbsp;sudo apt-get install dictd
This is simple. Now you need to install the dictionary. After each dictionary plug-in is installed, dictd automatically reloads its database. Let's install the English dictionary and the English dictionary.
Input:
- ___FCKpd___1nbsp;sudo apt-get install dict-gcide
- ___FCKpd___1nbsp;sudo apt-get install dict-moby-thesaurus
If you want to query other languages that can be queried, you can enter:
- ___FCKpd___2nbsp;sudo apt-cache search “dict package”
This will list the following:
- dict-freedict-eng-ara - Dict package for English-Arabic Freedict dictionary
- dict-freedict-eng-cro - Dict package for English-Croatian Freedict dictionary
- dict-freedict-eng-cze - Dict package for English-Czech Freedict dictionary
- dict-freedict-eng-deu - Dict package for English-German Freedict dictionary
- dict-freedict-eng-fra - Dict package for English-French Freedict dictionary
Now that you have successfully installed dictd, you can find the dictionary.
First, let's check whether the dictd service is running and what database is installed:
- ___FCKpd___4nbsp;dict -I
Sample output:
- dictd 1.12.0/rf on Linux 3.2.0-29-generic-pae
- On my_host: up 95.000, 2 forks (75.8/hour)
- Database Headwords Index Data Uncompressed
- gcide 203645 3859 kB 12 MB 38 MB
- moby-thesaurus 30263 528 kB 10 MB 28 MB
To query a word, you can specify the dictionary to be queried. Let's query the English one Dictionary (gcid ):
- ___ FCKpd ___ 6 nbsp; dict-d gcide [the words you want to query]
If you do not use the-d parameter, dictd searches for all the installation dictionaries and returns matching results.