Same as for Google, for Wikipedia I like an old script that works just fine: cliWiki. Once you install it, just run:
$ git clone https://github.com/AnirudhBhat/cliWiki.py $ cd cliwiki $ python cliwiki.py $ cliwiki This is quick weekend hack made to access Wikipedia from command line. Its written in python.To compile it just run 'python cliwiki.py'(without quotes) from your terminal and then enter the search title to get Wikipedia page on your terminal! It can also be given one of following 3 command line arguments. 1)potd 2)featured 3)onthisday this is just a quick hack and there's lot of crappy code in it.So please feel free to fork and send pull request if u want to improve it.
And then type in your search. If there is a direct match, the page will be displayed in the terminal. The output can be quite long so I advise you to channel it with the less command. It is certainly not the most efficient way to do it, but if your goal is to get a block of text concerning a keyword, this is exactly what you need.