When I am on the Mac, the terminal is bringing up colors on the path, is there a way to remove them? This is what I have:
2 Answers
Go into your Terminal's Preferences
pane and navigate to;
Settings
> Advanced
Click Display Terminal as:
(or something similar, haven't got language on English there) and choose a non-color display-method;
-
1Wouldn't that remove all colour from the terminal output? I am not 100% sure that the OP wants to remove all colour or just the colour from the prompt.– HennesApr 27, 2013 at 22:35
I solved this by adding this to the bash_profile file:
Open the bash_profile:
vi .bash_profile
Append this at the end of the file:
export PS1="\e[0;34m[\u@\h \w]\$ \e[m "
Save and close the file.
Final result: The path is in blue 0;34
, \u
gives you the username \h
gives you reduced host name and \w
gives you full working directory.
Complete options available:
\u = your username
\H = full hostname, e.g. bob.example.com
\h = reduced hostname, e.g. bob
\w = full working directory, e.g. /home/jamie/bin
\W = basename of the working directory, e.g. bin
\t = time in 24-hour format
\# = command number
\$ = root identifier; $ for regular users, # for root
\T = time in 12-hour format
\l = terminal device, e.g. tty4
\j = number of background/suspended processes
/etc/bashrc
bash
,tcsh
, orzsh
), not osxPS1
(i.e.echo $PS1
) and what shell you're using.