Add .bash_profile to your Mac Terminal

Do you want your Terminal to be colored?

Do you want to have a nice welcoming message when you open up the console?

1. Create /.bash_profile

Run the following command to create your own .bash_profile file.

sudo echo > ~/.bash_profileCode language: PHP (php)

2. Edit and Save the file

Edit the file:

sudo nano ~/.bash_profile

Paste the following code:

echo "What's up, Rick?"

export PS1='\[$(tput setaf 3)\]\u@\h:\[$(tput sgr0)$(tput setaf 5)\]\w\[$(tput sgr0)$(tput setaf 2)\] \[$(tput sgr0)\]$ 'Code language: JavaScript (javascript)

Save and restart your terminal. Enjoy! 😉

Leave a Reply

Your email address will not be published. Required fields are marked *