Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Factory reset mac terminal

Looks like I've messed up my terminal really badly.

Im trying simple commands like ls, cd but I get:

-bash: ls: command not found

No brew commands are found either.

I have tried following Is there any way to reset Mac terminal environment to factory settings?

But I get the same same message that -bash: rm: command not found

I can't even open my profile_bash file. Is there anyway to reset the terminal to factory settings. Nothing is working in terminal.

like image 470
Gurmukh Singh Avatar asked Mar 17 '26 04:03

Gurmukh Singh


1 Answers

Follow these steps to reset it:

  1. Open Mac terminal
  2. Click "shell", it's on the task bar at the top of the screen
  3. Navigate to "New Command" or press the keys shift + command + N
  4. Type mv .bashrc .bashrc.bak redo the same thing for .bash_profile
  5. Now restart your terminal. It should work fine!

Try recreating but files your renamed earlier by touch .bashrc same for .bash_profile.

like image 81
SuezDev Avatar answered Mar 20 '26 06:03

SuezDev



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!