How to practically use your Linux terminal (part 2)

How to practically use your Linux terminal (part 2)

How to practically use your Linux terminal (part 2)

Quite a while ago, we had published a post that showcased four examples of how Linux users can utilize their terminal to perform simple daily tasks and fulfill common everyday use needs. Of course, the use case possibilities for the Linux terminal are nearly endless, so we’re naturally back for a second part containing more practical examples.

if(typeof __ez_fad_position != ‘undefined’){__ez_fad_position(‘div-gpt-ad-howtoforge_com-medrectangle-3-0’)};

Send Email on the Linux Shell

Sending emails is something that we all do one way or another on a daily basis, but did you know that you can do it via the terminal? Doing that is actually very simple and all that you’ll need to have installed is the “mailutils” package. If you’re using Ubuntu, open the terminal and type:

sudo apt install mailutils

Next, to send an email, type “mail” followed by the e-mail address of the receiver. By pressing “enter”, you will be prompt to type a mail subject and once you do this you may hit “enter” again to start writing the content of the message. When you’re done writing the message, you may simply create a new line with “enter”, add a single dot, and then hit enter again and the message is sent.

Send email on the shell

As you can see, a message sent this way will most probably end up in the spam folder and while there are ways to override this, some services like hotmail for example won’t reveal the way their spam detection algorithms work, so you’ll have to try and find out, or simply notify the receiver and ask to mark you as “not spam/trusty source”.

We can even send a file attachment by adding the “-a” parameter followed by the location of the file in our filesystem. Take a look at the following screenshot showing how this is done.

Send email in a terminal

Browse the Internet on the Linux Shell

While there are many terminal-based internet browsers, I find Links to the simplest and easier to work with as it supports most of the widely used character sets and is able to render even some quite complex pages. To install Links in your Ubuntu system, open a terminal and type:if(typeof __ez_fad_position != ‘undefined’){__ez_fad_position(‘div-gpt-ad-howtoforge_com-medrectangle-4-0’)};

sudo apt install Links

Then type “links” followed by the website address like: “links”. Once you enter the website, you can navigate among the various links by using the enter and the arrow keys (back + forward).

Visit websites on the shell

The good thing with Links is that it uses the least possible system resources to access websites, and you can open many terminal tabs to open multiple websites, access your webmail, read news, etc. Also, Links can possibly save the day if you’re having trouble launching your graphical environment and don’t have another internet-enabled device to look for solutions.

Listen to Music on the Linux Shell

Speaking about resources, let’s suppose that you want to listen to a music album located on your disk, but you don’t want a music player running all the time and taking up extra resources for no reason. One solution is to play the files on the terminal, and while this won’t be completely resource-free, it will be much better for sure.

A great choice among the many is a terminal-based jukebox application called “Pytone” which you may install by opening a terminal and typing “sudo apt install pytone”. Next, open you File Manager, select the “view hidden files” option and navigate to the ./pytone folder. There you must create a new text file with the name “pytonerc” and then add the location of your music collection as shown in the following screenshot:

Linux shell music player

Navigating and adding new songs or directories (albums) can be easily done by using the designated keyboard buttons that are indicated on the bottom of the terminal. If you want to fiddle with the many options of Pytone, you can navigate to /etc/pytonerc as root and change the settings according to your liking.

Play a Game on the Linux Shell

Finally, the Linux terminal can be used for some playing fun, but of course you shouldn’t expect anything mind-blowing but rather simple and relaxing games. Here are three classic examples, namely pacman, snake, and space invaders, all running on the terminal.

Play Pacman in a terminal on Linux

You can find these under the package names “ninvaders”, “pacman4console”, and “nsnake”, but there are countless of more available in your default repositories.

I hope that the above examples will only serve as yet another indication of what you can do with the Linux terminal. Don’t forget to read the first part of this guide which contains four different examples, and feel free to share more practical ways to use the Linux terminal in the comments.

About the Author

Leave a Reply