[bash.bashrc infinite loop] Solve the problem that writing source /etc/bash.bashrc to bash.bashrc causes an infinite loop when logging in to root and all commands cannot be used.

Problem: Writing source /etc/bash.bashrc to bash.bashrc

As a result, VIM and sudo statements cannot be used to modify files.

A method I discovered by accident:

  1. Enter the system disk and find the root folder
  2. Double-click to open, requiring a password. This is equivalent to entering root mode.
  3. Then use vim to open bash.bashrc in etc/
  4. Just delete the last source /etc/bash.bashrc and it will be OK.

I wrote it myself so it's a bit complicated, but at least it's done hehe. If you have any optimizations, please discuss in the comment area! !

You're done! It’s not easy to write. If you succeed, please follow or like. Thank you~~


Guess you like

Origin blog.csdn.net/Callme_TeacherPi/article/details/129986983