MacOS is awesome for command line stuff, that’s why real Java programmers love it. But some of the defaults Apple have used make me sad. Where are all the colors? I demand my
ls command be pretty and colorful!
Why is Vim so bland?
I have seen several options on the web on how to adjust colors but some, albeit very good ones, make me uncomfortable with the type of installations that have to be performed in order to enable these themes.
So, after some digging and reading
man pages on terminal coloring and
ls I found a super-simple solution for decent terminal coloring.
If you have below questions then you are at right place:
- Simple Tricks to Improve the Terminal Appearance
- how do you change mac terminal theme
- mac terminal color
- change terminal color linux
- Customize the colors of your Terminal in MacOS
- Customizing the Terminal
Let’s get started.
Open Terminal Window. You should see the color scheme like this:
$ vi ~/.bash_profile and Enter Below lines and save file.
# Tell ls to be colourful export CLICOLOR=1 export LSCOLORS=Exfxcxdxbxegedabagacad # Tell grep to highlight matches export GREP_OPTIONS='--color=auto'
$ source ~/.bash_profile to initialize profile in current window.
You should see color now:
- CLICOLOR=1 simply enables coloring of your terminal.
- LSCOLORS=… specifies how to color specific items.
more coloring. Keep previously added lines and add these extra lines. This gives you a nice colored prompt.
export TERM="xterm-color" PS1='\[\e[0;33m\]\u\[\e[0m\]@\[\e[0;32m\]\h\[\e[0m\]:\[\e[0;34m\]\w\[\e[0m\]\$ '
And you should see color for username and command line prompt:
- Open terminal window
- Click on Terminal Menu
- Click on Preference
- Modify profile as per below image
- Select profile for
- On startup, open:
- New windows open with
- New tabs open with
I hope this helps you change terminal window colors easily.