How to configure the Terminal in Mac

Joined
Jan 27, 2009
Messages
35
Reaction score
0
Points
6
Hi,

I am coming from a Linux environment. Can you please tell me if I can do these in the Mac terminal?
* put my current path at the title of the Terminal and change it everytime I did a 'cd'?
* have color for my 'ls' output? and add a '/' for a directory in the 'ls' output?

Thank you.
 
Joined
Jan 28, 2009
Messages
5
Reaction score
0
Points
1
Your Mac's Specs
macbook 2.1ghz leopard
"man ls" prints all the options.
 
Joined
Jan 12, 2009
Messages
1,096
Reaction score
19
Points
38
Location
Prague, Czech Republic
Your Mac's Specs
2,4Ghz 15" unibody
by title you mean the tab/window name?? that would be nice, but I didn't figure it out :( if you do, let me know pls :)

i just have to do with having the path in the prompt, which is very similar, if not same, as on any unix to change .. but it is frustrating having more tabs without seeing right away where they are
 
OP
Y
Joined
Jan 27, 2009
Messages
35
Reaction score
0
Points
6
Can you please tell me how you did this "putting the path in the prompt"?

Thank you.
 
Joined
Jan 12, 2009
Messages
1,096
Reaction score
19
Points
38
Location
Prague, Czech Republic
Your Mac's Specs
2,4Ghz 15" unibody
have a look at this, looks good at a glance :)

How to Customize your Terminal Prompt - OS X Daily

to your question: the path is the \w command

Comment:
I think it's good to save your pompt in ".bash_profile" since that is the first file bash checks for configuration, it might not be present though, so you might have to create it

I can give an example I guess (I'l use the above tutorial, so it doesn't get confusing)

(in your home directory, probably where your term starts, and using bash)
touch .bashrc_profile
nano .bashrc_profile
export PS1="\u@\h:\w: " just put whatever you want/need inside the quotes
^O
^X

restart terminal (bash reads config at startup)

hopefully it's correct :D
 

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