How To Switch 'ls' Command Colours Off

BACKGROUND

Most modern Linux and Unix systems comes with an alias that defines colours for the ls command. Whilst in theory this may seem useful, it practice, with some terminal colour combinations the file and directory names become difficult to read.

This document describes options to switch the colours off the ls command's output.

USE unalias COMMAND

  • Either manually type the following command, or add it to the $HOME/.profile file:
    • unalias ls

USE alias COMMAND

  • Either manually type the following command, or add it to the $HOME/.profile file:
    • alias ls='ls —color=none'

UPDATE /etc/profile.d/colorls.sh COMMAND

  • Using a root privileged user, edit the /etc/profile.d/colorls.sh file and adjust the alias commands as appropriate.
© copyright 2001-2014 ABCdba.com | all rights reserved