From ArchWiki
Jump to navigation Jump to search

Sdcv is a command line dictionary. It provides access to dictionaries in StarDict's format.


sdcv is available from the official repositories


sdcv can be started from the command line:


This gives you a 'shell-like' command-line from which you can query the database.

Adding dictionaries

There are various places on the web where you can download StarDict dictionaries e.g.

Then you can extract the files into /usr/share/stardict/dic.

If you don't have root permissions, you can set the STARDICT_DATA_DIR environment variable. A good choice might be:


sdcv will look in the dic subdirectory so make sure that is created and place your dictionaries inside it

After that, you should be set


Alias sdcv

sdcv isn't a very good name for a terminal command you are likely to use a lot. A good name might be:

alias def="/usr/bin/sdcv"

Alternatively, you could use a wrapper around sdcv to conveniently format its output (Source):

def() {
	sdcv -n --utf8-output --color "$@" 2>&1 | \
	fold --width=$(tput cols) | \
	less -FRX

See Also