Change your Terminal prompt on Mac

Posted by jason on Dec 31, 2009 in Mac |

I hate the default prompt for the Terminal in Mac.  It usually takes up most of my terminal screen real estate.  It shows me my computer name, my current directory, and who the logged in user is.  I never need to know my computer name.  I rarely need to know who the username is.  If I did “whoami” will tell me.  I do like to see my current directory though.

create/edit the .profile file.  Add the following:

export PS1="\W$"

Source it by typing

. .profile

This will create a prompt with the current directory followed by the $.  Yay.

Reply

Powered by WP Hashcash

Copyright © 2010 programming with passion All rights reserved. Theme by Laptop Geek.