timmoore46
Posts: 266
Joined: Tue Jul 17, 2012 4:36 pm

Bash text colours - need monochrome - help !

Fri Mar 01, 2013 5:17 am

colour has appeared in this:-

pi@raspberrypi ~/master $ ls
control_004.log logfile_0012 logfile_0014 logfile_002 logfile_022 logfile_024 y z
pi@raspberrypi ~/master $

but as I'm colour blind it makes about half of it unreadable.

How do I get it all to be black ?

A puzzled,

Tim

User avatar
rpdom
Posts: 17029
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Bash text colours - need monochrome - help !

Fri Mar 01, 2013 6:35 am

The "ls" command has been aliased to use "ls --color=auto" which shows different types of files in different colours.

Some people like this, it seems.

To disable it for your current session, use "unalias ls".

To disable it permently for that user, edit .bashrc and comment out the line " alias ls='ls --color=auto' "

timmoore46
Posts: 266
Joined: Tue Jul 17, 2012 4:36 pm

Re: Bash text colours - need monochrome - help !

Fri Mar 01, 2013 7:41 am

found in etc

bash.bashrc

but could not find that line there.

unalias ls from bash worked a treat !

Many thanks !

:D :D :D :D :D

Tim

User avatar
jojopi
Posts: 3233
Joined: Tue Oct 11, 2011 8:38 pm

Re: Bash text colours - need monochrome - help !

Fri Mar 01, 2013 2:56 pm

.bashrc is in your home directory. It starts with a dot, so you need "ls -a" to see it.

/etc/bash.bashrc runs for all users. It sets up different things, that individual users are less likely to want to change.

timmoore46
Posts: 266
Joined: Tue Jul 17, 2012 4:36 pm

Re: Bash text colours - need monochrome - help !

Fri Mar 01, 2013 5:08 pm

Ah ! You save the day yet again !

Many thanks !

:D :D :D :D

Tim

Return to “General discussion”