4

I have used this accepted answer to set my editor in Terminal. Unfortunately it only sets for a single session which means every time I reopen Terminal I have to set it again.

I would like to set it once and never have to do it again. Just so you are aware, I'm using GNU Nano.

Thanks!

Community
  • 1
  • 1
Eric Brotto
  • 51,631
  • 30
  • 126
  • 173

2 Answers2

11

Put the command into your ~/.bashrc file.

Michael Krelin - hacker
  • 131,515
  • 23
  • 189
  • 171
2

I think, and I will be swiftly and pedantically corrected if I am wrong, but; putting that in your ~/.profile will be executed by any shell, ~/.bash_profile will be executed by bash I generally only ever edit my .profile on Mac ,or my .bashrc on Linux...

From my understanding the difference between bashrc and bash_profile, is that the bashrc gets called for new interactive terminals or when you start bash... Even from bash, and bash_profile is called for login terminals...

Grady Player
  • 13,976
  • 2
  • 48
  • 76