Home / Web servers / How to Set Custom Linux Console Colors

How to Set Custom Linux Console Colors

Linux color console
When you have your own Linux dedicated server, there is a good chance you will spend a lot of time at the command console. While there are plenty of graphical and web-based tools for Linux system administration, but nothing can really replace the power and simplicity of the command line.

One Linux feature that is very helpful when working from the command line is the ability to color code files and directories. For example, directories are displayed in blue, normal files in black, symbolic links in light blue, and executables in green. Some servers will have this setup by default. If yours does not, here is a quick way to have a more vibrant console.

First, you will need to edit the .bash_profile file for your user, which should be in your home directory. If your username is linuxgirl, it will be in /home/linuxgirl/.bash_profile. Enter the following line:

alias ls="ls --color"

If that does not work for your distribution, try the environment variable:

export TERM=xterm-color

Save the .bash_profile file, and you will have colorful output of the “ls” command ever after.

Check Also

Uk data center

Professional Data Centres In The UK

A professional data centre is a location in which various pieces of hardware are located …