You can disable all color in your shell. By default, colors are turned on by many commands. The xterm program is a terminal emulator for the X Window System. It enables colors too. Setting up TERM shell variable to VT220 or xterm-mono will also help. 

How to setup TERM shell variable

The environment variable TERM contains a identifier for the text window’s capabilities. You can get a detailed list of these cababilities by using the infocmp command, using ‘man 5 terminfo’ as a reference. To see current value run the following echo command:


echo "$TERM"

Sample outputs:

xterm-256color


So my xterm set with 256 colors. To make it mono set it too xterm-mono:


export TERM=xterm-mono

Better update your ~/.bashrc file with above line:


echo 'export TERM=xterm-mono' >> ~/.bashrc


Turn off color in Linux terminal for ls/grep/egrep commands

By default, ls command/grep command/nixcmd name=”egrep”] are aliased as follows:


type -a ls
alias ls='ls --color=auto'

You can verify it with the command command or type command as follows:
command -V grep
type -a grep
command -V egrep

To disable this, find and delete or comment out above lines in your ~/.bashrc or ~/.bash_aliases
#alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
#alias grep='grep --color=auto'
#alias fgrep='fgrep --color=auto'
#alias egrep='egrep --color=auto'

Save and close the file. Use source command to update your settings:
source ~/.bashrc
source ~/.bash_aliases

How to disable vim text editor color syntax highlighting

Syntax highlighting is nothing but a feature of vi/vim text editors that displays text, especially source code, in different colors and fonts according to the category of terms. To turn it off, press ESC key, type the following when editing a file:


:syntax off

Update your ~/.vimrc file and delete line that read as follows:


syntax off

See “Turn On or Off Color Syntax Highlighting In vi or vim Editor for more info.


How to disable colorful bash prompt

Again edit your ~/.bashrc file:


vi ~/.bashrc

OR


joe ~/.bashrc

Find and line that read as follows:


force_color_prompt=yes

Comment it out:


#force_color_prompt=yes

Save and close the file. You must close and reopen your terminal app.


آیا این پاسخ به شما کمک کرد؟ 0 کاربر این را مفید یافتند (0 نظرات)