Tag Archives: terminal

Add Time To Your Terminal

As those of you who follow my little slice of the net know, I have a severely autistic adult son. I run a couple of scripts remotely via secure shell, to keep an eye on what he is doing on his Linux laptop, which lets me make sure he’s not getting into mischief!

I found that one of my scripts would die every now and then, usually because my son would reboot his machine, or lose his WiFi connection briefly.

Wanting to know when the script stopped running, I decided it was time to add a time stamp to my terminal.

This is very easy to do. Just navigate to your home directory, and edit the .bashrc file, which holds your terminal configuration options.

Simply add the following line anywhere in the file:

PROMPT_COMMAND="echo -n \[\$(date +%F-%T)\]\ "

After you save the file, open a new terminal window and you’ll be greeted with a lovely time stamp!

 

Now we have the time in terminal.

Now we have the time in terminal.

The .bashrc config file has many other settings you can change, like the colors of the background and text, text size and lots of other goodies. Back up your original .bashrc file to another location, and experiment!

Terminal Tools: Midnight Commander File Manager

As I’ve always said, I prefer to do things from the terminal when I can. When taking care of my many computers, it’s handy to have a file manager that will work over an SSH connection. Enter Midnight Commander.

Midnight Commander is a text based file manager, that is very powerful and simple to use.  I’d found it a few months ago, when I was trying to easily find some media files on my son’s computer, without him knowing I was poking around. This of course meant I couldn’t use VNC.

To install Midnight Commander, simply open a terminal and type the following:

sudo apt-get install mc

Of course, if you have connected to a remote computer, you can do the install on that remote machine with the same command.

Once installed, running Midnight Commander is as simple as opening a terminal, either locally or remotely and typing: mc

Midnight Commander

Midnight Commander

Midnight Commander includes an internal editor with syntax highlighting and an internal viewer with support for binary files!

 

Terminal Tools: Speedtest -CLI

I much prefer using the terminal most of the time. I do so to update all of our Linux computers on the farm, issue various commands, run shell scripts I’ve written to automate certain tasks, etcetera.

Today’s terminal program idea comes from one of our GoatsLive followers who is also a Linux geek. *(It’s been a busy week, and I’d lost my muse) In fact I’ve invited him to write some guest articles when he has time. It’s funny that I never mentioned it, because I use it. The program, Speedtest -cli

Speedtest will allow you to check your connection, without using a browser. Useful for your ownCloud or other server that you don’t want a browser installed on.

To install it quick open your Package Manager and search for Speedtest:

Package Manage, installing SpeedTest

Package Manage, installing SpeedTest

Once installed, open a Terminal window, and type: speedtest —help for the short list of configuration commands you can use:

Speedtest help

Speedtest help

Of course, all you really need to do is type: speedtest in your terminal and press {Return}

Slow bedroom computer results

Slow bedroom computer results

My results on my bedroom machine are very slow, but it’s on an old WiFi router, with very low signal strength. It works for what I use it for though. We pay for and mostly get 50mb Fios here on the farm.

 

 

Let’s Be Silly: ASCII Cow In Your Terminal

After a very stressful week here on the farm, I decided to actively look for cute little ditties that are already installed in Linux Mint.

Spending so much time in a shell terminal, I was pleased to find a lovely little ASCII cow who will say whatever you tell her. Indeed, you can even have the cow give you your fortune cookies or tips of the day, when you open a new terminal.

Cowsay ascii cow

Cowsay

After you open a new shell terminal, just type the following:

~ $   cowsay Hello World

And say hello to your shell terminal cow!

It’s quite a versatile cow, and I found a blog that will take you through some of her abilities. You can find that info HERE

Personally, we just enjoyed the old-time ASCII graphics. It took us back to our BBS days. Anyone else out there ever use the old ANSI Animator from back in the DOS 2.11 days? Good times!

 

Text Editing

We run Linux Mint. This came about after the newer Ubuntu release had the new Unity menu system that nobody on the farm liked.

Mint comes with a text editor of course, but we found something much better.

Search your software manager for Medit.

Medit not only does a great job for editing text and shell scripts, but it also has some other nice features. Among them, an integrated terminal button, to run stuff from the command line. Saving documents with languages like Japanese or Chinese works flawlessly with the encoding that the software uses.

Also, Medit speaks several programming languages, like PHP and HTML. This makes it easy to find missing brackets and other flaws in your code!