2

I've set the TERM variable value to linux-m to have a monochrome terminal. What's peculiar it doesn't changed anything - when i issue ls -l or grep --color i still get colorized results. Why does it returns colors if the terminal is no-color?

For previous information on this see Changing TERM variable and color output. It's related but has another focus.

1 Answer 1

1

Each command (program) has its own options and they override common options of terminal at all.

  1. To have monochrome prompt: open your ~/.bashrc file. Find strings begins from PS1=, PS2=, PS3=, PS4= and comment them (place # at the beginning).

  2. To have monochrome ls output: find file ~/.dircolors and rename it to ~/.dircolors_old.

  3. To have monochrome grep output: grep takes its colors from environment variable GREP_COLORS (deprecated GREP_COLOR). It might be set in ~/.bashrc. You should comment it too.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .