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_profile
Code 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! 😉

About Ricard Torres

Senior Front-end Software Engineer at Netcentric, from Barcelona, Haidong Gumdo Instructor (korean martial art of the sword), street photographer, travel lover, TV addict, Boston Red Sox fan, and privacy advocate.

@ricard_dev @ricard_dev

📝 Blog 🎙 Podcast

Leave a Reply

Add <code> Some Code </code> if you need to.