1

How can I reset gnome-terminal color scheme? My terminal not showing color difference when I use ls command. All files and directories shown in white. It's difficult to see which one is directory and which one is file. I don't know what exactly cause this problem. The problem comes from my linux installation before. For details what I have done that causes this problem is:

  1. I install arch linux system.
  2. I delete home partition and create a new one. There, gnome-terminal color scheme is not working for the first time.
  3. I install Ubuntu with that arch home partition that I used before without formatting it. I think the settings carried on.
  4. Then gnome-terminal color scheme have the same problem from the previous arch system.

How can I fix this?

2 Answers 2

3

When you deleted your home partition, you may have removed the alias for ls that's configured by default, and which would be in ~/.bashrc. Since you kept the same home directory when installing Ubuntu, this theory explains what you are experiencing.

To test whether this is the case, use

ls --color=auto

If this works correctly, you need to restore the default aliases and some other things, for this I suggest you just copy /etc/skel/.bashrc into your home directory (be careful if you've customized the .bashrc in your home dir).

This also depends on the coreutils package (for the dircolors utility), but that's installed in every ubuntu system so I'm pretty sure you're not missing that package.

6
  • It works. But, I just wondering, why it's not automatically generated when I install Ubuntu?
    – Mas Bagol
    Feb 11, 2015 at 21:47
  • 1
    Ubuntu is respecting your existing .bashrc (or if you didn't have one, it respects that fact as well), you wouldn't want Ubuntu to destroy it without asking :). It's only generated automatically from /etc/skel when you create a new user.
    – roadmr
    Feb 11, 2015 at 21:54
  • May your settings have been overwritten by .profile_bash. In this case bashrc is not loaded. That was my problem. Jul 12, 2017 at 15:28
  • I was wondering how you came up with the solution.
    – pdvries
    Dec 2, 2018 at 11:15
  • @RatataTata *.bash_profile
    – wjandrea
    May 31, 2019 at 13:44
0

You need to copy the file /etc/skel/.bashrc into your home directory.

Then you also have to run source ~/.bashrc or launch a new shell to use the changes.

This worked on 16.04.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .