My school server is Redhat 7.4 and I really hate the default colors which are printed in ls. bold and dark colors with a black backround is really hard for me to see any file names.

I am currently using os x and iTerm2 for SSH. When connecting to my own debian server, ssh automatically changes server colors to be the ANSI colors I chose from iTerm settings. But in Redhat this doesnt happen. Also most of the guides in the internet require changing something from /etc.., which I am of course not able to do.

So is it possible to change the colors just for my user and locally without being sudoer?

Thank you for helping me.


You can make an alias in your ~/.bashrc:

alias ls="ls --color=always"

Yo can also set the environment variable LS_COLORS, check online for examples, just look for it with your $search_engine of choice, make sure you export it if you add it to your ~/.bashrc

export LS_COLORS="..."

Basically, read about ~/.bashrc, and what you can do with it, remember alias is your friend in the command line.

| improve this answer | |
  • There is no .bashrc file. Can I just create one? – Joona Mar 28 '18 at 9:23
  • Yes, you can, just open your editor or use echo and >>. – J. García Mar 28 '18 at 9:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.