I spend a lot of time in terminal, and on my mac, so I am constantly looking for ways to make it a little better. And color is one of the best ways…
So to enable colors in terminal on a mac, the first thing you need to do is to create a .bash_profile
- Open up your terminal
- Type ‘ cd ~’ to go to your home folder.
- Type ‘touch .bash_profile’ which will create your new bash file.
- Edit the ‘.bash_profile’ file you just created with your favorite text editor.
- Add in these two line to the file:
- Go back to your terminal and type ‘. .bash_profile’ (note the space between the periods).
- Try it now with an ‘ls’ command. If it still isn’t in color, try restarting your terminal.