
Going further with ANSI colors, if you discover that certain text contrast or text colors are hard to read with a specific profile or against a specific background color in Terminal, you may want to manually adjust the ANSI colors used by Terminal app, this is done through the Preferences > Profiles > Text section: This makes things like directories and executables be bold and brighter, making them easier to spot in listings. Choose your profile/theme from the left side list, then under the “Text” tab check the boxes for “Use bold fonts” and “Use bright colors for bold text”.
Pull down the Terminal menu and choose “Preferences”, then click the “Settings” tab. Most themes have ANSI color on by default, but enable it if it’s not. This will be theme and profile dependent, meaning you will have to adjust this for each theme. Enable Bold Fonts, ANSI Colors, & Bright Colors Still not satisfied with the appearance, or have you already done that? There’s more to do. Open a new terminal window, run ls, and see the difference. Pasted in properly, it should look like this: G colorizes output, -h makes sizes human readable, and -F throws a / after a directory, * after an executable, and a after a symlink, making it easier to quickly identify things in directory listings. The next two lines enable command line colors, and define colors for the ‘ls’ commandįinally, we alias ls to include a few flags by default. The first line changes the bash prompt to be colorized, and rearranges the prompt to be $” Hit Control+O to save, then Control+X to exit out of nano. bashrc located in the home directory, for the purpose of this walkthrough we’ll use. Modify Bash Prompt, Enable Colors, Improve ‘ls’Īt a bare minimum, let’s get a better bash prompt, improve the output of the frequently used ls command, and enable colors.
Follow along and try them all, or just pick and choose which makes the most sense for you.