How to print out all available terminal colors. And other useful Linux tricks.

How to best view all available terminal colours This one-liner will print out all available terminal colours for your chosen Linux terminal application. This is very useful for creating a colourful bash prompt and the user wishes to know which colour codes will work and look good in the terminal. for x in {0..8}; do … Read more

How to print out bash colors and see how many are available on your chosen terminal.

A color terminal on Linux can print a wide variety of colors. But how many colors can it print? The colortest utility can show this. Install it like this. ┌──[[email protected]]─[~/Documents] └──╼ ╼ $ sudo apt-get install colortest┌──[[email protected]]─[~/Documents] └──╼ ╼ $ sudo apt-get install colortest Then run it to get a display table for 16-color terminal … Read more

Useful bash shell prompt with customizable colors that are switchable on the fly.

This bash script will give you a custom bash prompt that has colors that are switchable on the fly. PS1=$( sep=$’\xC2\xBB’ # UTF-8 U+00BB red=$(tput setaf 1) green=$(tput setaf 2) yellow=$(tput setaf 3) blue=$(tput setaf 4) cyan=$(tput setaf 5) bold=$(tput bold) reset=$(tput sgr0)   [[ $EUID -eq 0 ]] && user=$red || user=$green   echo … Read more

Cool BASH script that I thought I would share. Print out all of the BASH colors.

This is a BASH shell script that will print all of the available colors using the BASH shell. The colors are useful for colorizing your BASH prompt to differentiate it from your shell output. #!/bin/bash   # colors.sh – Print out all the different ECMA color-mod combos # # 2008 – Mike Golvach – [email protected]Read more