Add Hostname, Date, Time, Uptime, Load Average to Linux Terminal Title

terminal-logo-small

This tip is really useful if you need/want to monitor multiple servers at the same time. This Tip works, as the tip, by which you can add the date and time the title of the Linux terminal, but it adds more usefull info to terminal title. Following bash one liner add hostname, date, time, uptime, users and load Average to Linux Terminal Title and updates it every second.

This trick works at least following terminals: Gnome Terminal, xterm, urxvt, rxvt.

Add hostname, date, time, uptime, users and load Average to Linux Terminal Title

Simply type the following command line:

while sleep 1;do echo -ne '\033]2;'`/bin/hostname`' - '`date +\%a\ %b\ %d`', '`/usr/bin/uptime`'\007';done&

If you want to get this working every time you open console or connect to remote server then you need just copy and paste that one liner to your ~/.bashrc files.

Example screenshot, using different servers

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close