In Linux, how does one query dictionaries?

Source: Internet
Author: User
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:

 
 
  1. ___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:

 
 
  1. ___FCKpd___1nbsp;sudo apt-get install dict-gcide 
  2. ___FCKpd___1nbsp;sudo apt-get  install dict-moby-thesaurus 

If you want to query other languages that can be queried, you can enter:

 
 
  1. ___FCKpd___2nbsp;sudo apt-cache search “dict package” 

This will list the following:

 
 
  1. dict-freedict-eng-ara - Dict package for English-Arabic Freedict dictionary 
  2. dict-freedict-eng-cro - Dict package for English-Croatian Freedict dictionary 
  3. dict-freedict-eng-cze - Dict package for English-Czech Freedict dictionary 
  4. dict-freedict-eng-deu - Dict package for English-German Freedict dictionary 
  5. 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:

 
 
  1. ___FCKpd___4nbsp;dict -I 

Sample output:

 
 
  1. dictd 1.12.0/rf on Linux 3.2.0-29-generic-pae 
  2. On my_host: up 95.000, 2 forks (75.8/hour) 
  3. Database      Headwords         Index          Data  Uncompressed 
  4. gcide              203645       3859 kB         12 MB         38 MB 
  5. 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 ):

 
 
  1. ___ 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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.