LS_COLORS Explained

In my previous article I showed you how to make the ls command display colored output; now I am going to show you how to customize what colors get displayed. We are going to use the LS_COLORS environment variable to accomplish this task. You can change your LS_COLORS environment variable by setting it in your $HOME/.bash_profile or $HOME/.bashrc file. The syntax for LS_COLORS is as follows: 1

Continue reading

Colored ls Output

Unix uses the ls command to list the contents of a directory. By default ls displays all directories and files the same way, leaving you without the ability to quickly determine what type of files you are looking at (in Unix everything is a file). Here is an screenshot showing the default output of ls on OS X: ls has the ability to color code different file types by passing the --color option to ls.

Continue reading

I came to OS X from the wonderful world of Linux; upon doing so I really missed my customized terminal prompt; after all, the default Mac OS X prompt is really boring and blah. Customizing the default shell prompt not only makes the terminal that much more exciting, it will also help you remember which system you are currently on and the directory you are about to run a command in (Yea!

Continue reading

Author's picture

Derek Tracy

Full-stack engineer, architect, circuit bender, and hardware hacker

“Learning never exhausts the mind.”
― Leonardo da Vinci

Senior Platform Architect