VSCode

How to change color of directories in oh-my-zsh

Customizing the color of directories in oh-my-zsh can significantly enhance your terminal experience, making it more visually appealing and easier to navigate. Here’s a simple guide to help you achieve this.

First, visit this website where you can experiment with different color schemes. This interactive tool allows you to see how various color combinations will look in your terminal.

Once you’ve found a color scheme you like, you need to update your .zshrc file to apply these settings. The .zshrc file is where oh-my-zsh configuration is stored. You can open this file with your preferred text editor, for example:

nano ~/.zshrc

Scroll to the end of the file and add your chosen color scheme. If you’re using Linux, you will need to use the LS_COLORS variable, and if you’re on a Mac, you should use LSCOLORS. Here’s an example of how to set this up:

For Linux:

export LS_COLORS='di=0;34:ln=0;35'

For Mac:

export LSCOLORS='exfxcxdxbxegedabagacad'

After adding your color scheme, save the changes and restart your terminal or reload the configuration with:

source ~/.zshrc<br>
# or
omz reload

Your directories should now display in your chosen colors, making your terminal both functional and visually appealing. Enjoy your new, personalized terminal experience!

Suggested Articles

Leave a Reply

Your email address will not be published. Required fields are marked *