I'm new to OS X and also other Linux distributions(Ubuntu, CentOS, RHEL) user.
I want to know why OS X's bash can not use --color=auto
option and how to enable it.
I often use ls --color=auto
, but on OS X, it doesn't work. The following is the command output:
$ ls --color=auto
ls: illegal option -- -
usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file ...]
I also read man page of ls
, and I found ls -G
is enabler of colorized output.
So, at this time, it's okay, but I'm a little bit annoying because I'm sharing the .bashrc
and .bash_profile
for all my linux environments.
Does anyone know these bash's different? And do you have any good idea to share the .bashrc
and .bash_profile
between OS X and some linux distributions without additional edit on each environment.
P.S.
My friend tells me bash on AIX(Linux server IBM version? I'm not sure) could not run ls --color=auto
also.