0

I used vim .bashrc to open my bashrc file, but I forgot to go to the home directory. I think this command have created several new bashrc files, should I remove those files?

1
  • You already have an answer, but my tip is to use vim ~/.bashrc so you don't have to bother about which folder you reside in. Feb 10, 2022 at 12:30

1 Answer 1

0

Having multiple .bashrc files in different locations will not cause any issues. The one in your home directory is the only one that is loaded when you launch bash. You may want to delete them however to avoid confusion if others use your system/server.

You can use rm .bashrc after you have changed directory to the directory containing the .bashrc you accidentally created using cd <location of extra .bashrc>.

Note: Vim will not create a file unless you exit with :wq.

You must log in to answer this question.

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