Color your Mac Terminal?

Joined
Feb 6, 2005
Messages
1,551
Reaction score
102
Points
63
Location
Chicago
Your Mac's Specs
MacBook Pro M1 • iPhone 14 Pro • iPad Pro • iMac Retina 27"
Did you try the Preferences in Terminal?

Terminal --> Window Settings... -> Color
 
Joined
Sep 13, 2006
Messages
3,570
Reaction score
470
Points
83
Location
Colorado
Your Mac's Specs
Mac's
Caribiner23 is corect, and if you would like those settings to stay after closing the terminal you need to click "Use as Default".
 
OP
DoubleCap
Joined
Feb 12, 2007
Messages
552
Reaction score
8
Points
18
Location
Northeast US
Your Mac's Specs
MacBook 2GHz/2GB/CD
Hi, is there a tool that will color the mac terminal? I don't mean the regular change color of the font displayed, but something that will give a look like this: http://www.redhat.com/img/colored_prompt.png ?

No, I know about that already. Did you go to the link I posted? Something that will have a different color for the, let's say, prompt, something different for the actual line you're typing, etc...
 
OP
DoubleCap
Joined
Feb 12, 2007
Messages
552
Reaction score
8
Points
18
Location
Northeast US
Your Mac's Specs
MacBook 2GHz/2GB/CD
Thanks so far.

What do I do? How do I get these running?
 
Joined
Jun 6, 2006
Messages
1,153
Reaction score
94
Points
48
Your Mac's Specs
MacBook 2.0GHz White, 512MB RAM, 60GB HDD
A quick google for 'bash prompt colour' brings back loads of tutorials and references. It's exactly the same for OS X as it is for just about any flavour of Linux or BSD :)
 
Joined
Mar 2, 2007
Messages
250
Reaction score
18
Points
18
Location
St Helens, OR, USA
Your Mac's Specs
MacBook CoreDuo 2Ghz 768M RAM
open terminal
make sure you're in your home directory
open .profile with your favorite terminal editor (I'ma vi or nano kinda guy)
add alias ls = "ls -G".
 
OP
DoubleCap
Joined
Feb 12, 2007
Messages
552
Reaction score
8
Points
18
Location
Northeast US
Your Mac's Specs
MacBook 2GHz/2GB/CD
I'm in my home directory, and I type in "nano .profile" but nothing shows up.. only a blank text editor.
 
Joined
Feb 14, 2004
Messages
4,781
Reaction score
166
Points
63
Location
Groves, Texas
Thats because it's not there by default. Try the following:
Copy this:

# ~/.bashrc: executed by bash(1) for non-login shells.

export PS1='\u@\h:\w$ '
umask 022

##########################################
#setting up file completion
#

if [ -f ~/.bash_completion ];
then
. ~/.bash_completion;
fi


############################################
# You may uncomment the following lines if you want 'ls' to be colorized:
#

export CLICOLOR='true'
export LSCOLORS="gxfxcxdxbxegedabagacad"

###########################################
# set up aliases
#

alias ll='ls -laghF'
alias l='ls -laghF'
alias grep='grep -n'
alias netconns='netstat -a -f inet'
alias cd..='cd ..'
alias ..='cd ..'
alias cls='clear'
# alias vi='vim'
# alias c++='g++'
# alias cc='gcc'
#
# Some more alias to avoid making mistakes:
# alias rm='rm -i'
# alias cp='cp -i'
# alias mv='mv -i'
alias ttop='top -ocpu -R -F -s 2 -n30'


Now type "pico .bashrc" (or you can use nano) without the quotes.
Paste the above into it.
Save. Quit and restart Terminal.
Your files and directories should now be in color.

You can set different colored prompts by using escape characters. Just add the codes to .bashrc. I use the one called "bash_styles". It lets you change prompts on the fly without having to restart Terminal.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top