If you linuksoid with experience, you usually spend a lot of time on the command line. Over the years, many system administrators have learned to do most of the work without even touching the mouse and now they are eager to share these skills with everyone! For example, the tips Steven Won, slightly adapted by me for our audience.
In this article we will discuss five things you can do from the command line to have a high performance OS (because the GUI likes to “eat” the resources of the machine) and at the same time to “break” its dependence on a graphical interface. Agree, for anyone who wants to learn UNIX-like OS, CLI is very important to stay confident by the user.
Know the weather from the command line
Yes, CLI is able.
Instead of having to reboot the system, opening a browser or installing additional widgets”Povedniki”, you can run a single command:
Please note! In some distributions, the curl comes by default. In order to take advantage of this opportunity, you should install curl in the same way as you install any other package!
For example, today’s weather in Kiev, Ukraine:
Quite convenient screen weather
By default, the above tool will provide you with the current weather and an overview, including the following 2 days. It gets your location from your IP address, but you can also change this:
Search weather information for UKKK airport (the airport “Kyiv” imeni Igorya Sikorskogo)
You have a lot of options to customize your device the way you like. You can use the three-letter airport codes (IATA standards — approx. transl.), to change the units of weather, to the phases of the moon, and format the output in various ways. The opportunity also supports many different languages. The list of options available on the project page on GitHub.
Calculator in command prompt
In order to perform a variety of iscelenie, to run the graphical interface is also useless! We have an absolutely gorgeous thing called bc, and it is a console calculator with sufficiently rich functionality. Run the command:
Here’s what you will see:
A simple calculator interface
Team bc allows you to perform simple math, use base 2 math (binary) or base 16 (hex) and many more.
Please note! Most systems come with installed bc, but if the package for some reason, there is no need to install it.
More details about this utility can be found in the “Fedora Magazine” (in English). I advise you to start to perform:
This will help to obtain short help on the basic features.
Dictionary in the command line
Dictionary command-line (contains header files) is a great little tool. Many people forget to use it — and in vain, because in addition to providing definitions for words, you can also use it for language translation, and synonyms.
If your distribution does: install it from repositories: all the most popular variations of GNU/Linux offer it to their users in this way.
To use the dictionary, you can simply run:
dict word | more
Naturally, in the command above, the word “word” is a variable.
One of the definitions of the word “linux”. The other two are on screen not got
Dictionary : allows you to use an online or local database. You can find instructions for it here (PDF).
Viewing web pages from the command line
You can surf the modern Internet directly from the CLI! To help you come to a galaxy console browser like links, links2 and lynx. The fundamental difference is not in them, and there is already rather a matter of taste, than to use you, but I suggest lynx: among all these is considered to be the most relevant.
Install the lynx command to install the packages of your distribution: definitely have it in the repositories!
After installation, let’s visit, for example, our website:
The lynx in action
Of course, it is not really user-friendly interface, but with time you get used to it.
Navigation is standard UNIX ish set of keys like Tab, arrows, Enter, and so on.
The browser even has its own website (which appears correctly in the console)! I advise you to look there, to understand with all its possibilities.
Searching in Google using the command line tool
In the vast GitHub is a rather interesting project — googler. It will allow you to make search directly in the CLI, without using bulky browsers.
“googler is a powerful tool for Google (Web & News) and Google Site Search from the command line. It shows the title, URL and short description for each result. All positions can be opened in the browser directly from the terminal. The results are shown on the pages (with page navigation). Supports incremental search in the same instance of Google”.
Page googler’and on GitHub
In order to effectively use them, to begin to install any console-based browser, e.g. lynx, about which we have talked.
Install googler from the repository of your OS. If it’s not there, you can also use snap-variations. And further — a trick:
Example usage googler
Very convenient, isn’t it?
Instead of conclusions
In order to understand GNU/Linux, the need to use the command line. Above, we talked only about the five features of the CLI. In fact, they are limitless.
And you often work at the command line instead of GUI? Tell us in the comments whether you think the described tools are useful and relevant to you!
Author: Steven Vona, black
Translation, adaptation, additions: root
Image: from public sources, screenshots of the author