I have CentOS 7 running as a guest OS inside a VirtualBox host. I opened a terminal to write some commands, but the colors are all messed up as shown in the following print screen:

It looks like text is highlighted, but the light blue against white background makes it nearly impossible to read.

How can I restore the black text on white background so that I can read the terminal?

White text on black background would be equally good. I just need high contrast between text and background to be able to read.

  • Type this: reset. – Cyrus Jun 25 '15 at 20:05
  • @Cyrus Thank you. However, typing reset had no effect. – CodeMed Jun 25 '15 at 20:07
  • Try this: \ls -al. – Cyrus Jun 25 '15 at 20:08
  • @Cyrus Thank you again. \ls -l makes the resulting text black on white background. But then typing ls -al again results in the same light blue shown in the printscreen in my OP. So \ls -l is a temporary patch. – CodeMed Jun 25 '15 at 20:11
  • Try this to see the problem: alias ls. With a leading \ you can disable the alias for this command. – Cyrus Jun 25 '15 at 20:13

Add this to last line of your ~/.bashrc:

unalias ls

and type

source ~/.bashrc
  • Thank you and +1 for solving the problem in a timely manner. – CodeMed Jun 25 '15 at 20:46
  • or a solution for all users: mv /etc/profile.d/colorls.sh /root – Cyrus Jun 25 '15 at 20:51
  • I have what seems to be a downstream problem that seems to stem from these changes. Are you willing to look at it? Here is the link: unix.stackexchange.com/questions/212493/… – CodeMed Jun 26 '15 at 22:11
  • I would prefer glenn's approach. – Cyrus Jun 27 '15 at 4:39

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.