1

I have a problem with my terminal in Ubuntu server 20.04. I would like to color the syntax in my terminal, but after I restart the server, it's back to the normal uncolored syntax. I edited .bashrc and uncommented this line:

force_color_promp=yes

I then and restarted .bashrc with the command source .bashrc, but as I wrote earlier, after restart it returns to the previous non colored syntax.

I don't use ssh to connect to the server. I'm working on it through the console, and I don't have a .bash_login file. I am trying to find a different configuration file.

terdon
  • 104,119
Dany
  • 119

1 Answers1

0

The file .bashrc is not relevant to your case. When you log into your server from the console, you are starting an interactive login shell and that kind of shell ignores ~/.bashrc and instead reads ~/.profile.

So, to make the changes you want persistent, you need to make your edits in ~/.profile and not ~/.bashrc. See here for a more in-depth explanation of what files are read in what types of shell:

terdon
  • 104,119