Linux: Trun On/Off Colors For “ls” Command

This post will guide you how to trun on or turn off colors in the output of the ls command in the command line interface of Linux system. How do I enable or disalble colors for ls command in Linux terminal or bash session.

Trun Off Colors For ls Command


The ls command is used to display the contents of a folder in the Linux terminal. and the most of modern linux distributions systems have defined colors for ls command with alias command in your .bashrc file. So if you want to disable or turn off color setting for ls command, you can unalias ls command setting or using the –color=none option, just like the following command:

#ls --color=none

Or

#unalias ls

Trun on Colors For ls Command


To turn on or enable color setting for ls command, you can use the –color=auto option for ls command or restart alias name for ls command. type the following command:

#ls --color=auto

Or

#alias ls='ls --color=auto'

Trun Off color in Vi Editor


If you want to turn off or disable color syntax or turn off highlighting in vi or vim editor, just press ESC key in your keyboard, and then type the following command in the vi editor:

:syntax off

 

You might also like:

Sidebar



back to top