Turn off color in Linux terminal/bash session

https:/‮www/‬.lautturi.com
Turn off color in Linux terminal/bash session

To turn off color in a Linux terminal or bash session, you can use the alias command to create a new alias for the ls command that disables color output.

Here's how to do it:

  1. Open a terminal or bash session and enter the following command:
alias ls='ls --color=none'

This will create an alias called ls that runs the ls command with the --color=none option, which disables color output.

  1. To make the alias permanent, you can add it to your .bashrc file. To do this, open the .bashrc file in a text editor:
nano ~/.bashrc

Scroll to the bottom of the file and add the following line:

alias ls='ls --color=none'

Save the file and exit the text editor. The next time you open a terminal or bash session, the alias will be available.

If you want to turn color back on, you can simply remove the alias by running the following command:

unalias ls

This will remove the ls alias and restore the default behavior of the ls command.

Created Time:2017-10-30 14:27:22  Author:lautturi