Linux Commands

How to Look Up Dictionary via Terminal on Linux

If you’re a Linux user and use the command line for performing different tasks. Then you might need a dictionary somewhere to learn about the meaning of words. In case your system has no network connectivity so you have to refer to an offline dictionary. One of the offline lookup dictionaries is dictd that can look for different words and their meanings. In this article, we’ll show you how to use the command line to look up dictionary definitions quickly and easily using dictd.

How to Install dictd on Linux

The first step is to install the dictd. This utility is used to access dictionaries from the command line. To install it run:

$ sudo apt install dictd

This command will install the dict protocol on your Linux system.

How to Install dictd Offline Databases

To install dict offline databases use:

$ sudo apt install dict-gcide

Install dictd on CentOS, RHEL or Fedora

To install dictd on CentOS, RHEL and Fedora use:

$ sudo yum install dictd dict

Or:

$ sudo dnf install dictd dict

Like Debian based system you can also install the offline database on CentOS, Fedora or RHEL, use:

$ sudo yum install gnome-dictionary

Or:

$ sudo dnf install gnome-dictionary

How to Use dict Command

Now that you have the dict protocol and a dictionary installed, you can start looking up definitions. To look up a definition of a word run command:

$ dict [word]

Replace “[word]” with the word you want to look up. For example, to look up definition of “CPU”, you would type:

$ dict CPU

This command will display the definition of “CPU” in the terminal.

To open the dictd help file in Linux, you can use the “dict” command with the “-H” option followed by the name of the dictionary for which you want to see the help file.

For example, to view the help file for the “gcide” dictionary, you can run the following command:

$ dict -H gcide

This will open the help file in your default terminal-based text editor, such as nano or vim. You can use the arrow keys to navigate through the help file, and press “Q” to exit when you are finished.

Conclusion

Looking up dictionary definitions from the command line is quick and easy with the DICT protocol. By following the steps outlined in this article, you can install the protocol and dictionaries, and start looking up definitions in no time.

About the author

Kashif

I am an Electrical Engineer. I love to write about electronics. I am passionate about writing and sharing new ideas related to emerging technologies in the field of electronics.