简体   繁体   中英

How to reset the command line back to factory settings?

There are questions like this already. My problem is my command line is only reading the first word of every command. I know I did something to mess it up but I don't know what or how to reverse it. I'm very new, I'm using a MacBook Air intel and zsh.

I tried mv ~/.bash_profile ~/.bash_profile_backup . The output is zsh: command not found: mv .

I think the terminal is only reading the first word. Also when I go to preferences and look for the terminal file to delete it, I don't see it. I have been stuck for days and can't even begin to code until this is fixed.

To reset your Zsh config to "factory defaults":

  1. Open the Finder.
  2. In the side bar, click your home folder (which has a house icon, followed by your username).
  3. Press . to reveal hidden files.
  4. Move all files starting with .z to another folder.
  5. Open a new Terminal window/tab.

The output is zsh: command not found: mv .

This means you've removed /bin from your $path . To fix this:

  1. Look through your .z* files (which you moved to another folder, above) to find where you made this mistake.
  2. Fix the mistake.
  3. Put your .z* files back into your home folder.
  4. Open a new Terminal window/tab.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM