-2

I will try to outline this as best I can because I know other people have had a version of this problem.

I received a routine update to Conda last week, which asked me to change the path for my environments. New to development and not knowing better, I was able to eventually access my ~.bash_profile and find that multiple installs of Anaconda had written multiple sets of system instructions. Again, not knowing any better, I wiped my profile and replaced it with Anaconda’s preferred path route.

Amazingly, Conda is about the one thing that is now working. I can activate my environments and run most of my Python commands, but none of my normal Terminal commands are working. I have tried solutions posted here including vi ~/.bash_profile, nano and echoing the path, but even when I access my profile, I do not know how to restore a functional bash. I somehow deleted my system’s ability to recognize Terminal commands including mkdir, -g, which, and so on.

A few Terminal promps that pop up on initialization: -bash: open: command not found -bash: /anaconda3/etc/profile.d/conda.sh: Permission denied

Any help here would be appreciated. I thought to restore from a backup, but Time Machine will not let me overwrite system configurations and I cannot drag & drop my old bash (the function to reveal hidden dot files is also disabled after deleting my bash) A link or gist to a good boilerplate bash profile for me to use would be nice, if anyone knows of one.

Gordon Davisson
  • 118,432
  • 16
  • 123
  • 151
E. W
  • 1
  • 1
  • Create a new user and copy the default profile etc from there? Your OS is much more important than all that "tag spam" you've added. On linux setting your path to "/usr/local/bin:/usr/bin:/bin" should get you a fair way to usable. – John3136 Apr 17 '18 at 03:07
  • If would help a lot if you added the current contents of your ~/.bash_profile to the question (in code format). – Gordon Davisson Apr 17 '18 at 05:49
  • @John3136 I think I might do that. I have biweekly backups of my data to import from and I can recreate almost anything else I need. I haven't been doing this very long, but I do not have a deep enough understanding of paths and directories to diagnose the problem, and in my limited experience on this site, no one is going to help me if I cannot describe the problem as narrowly as possible, which I do not think would be easier than rebuilding my directory. – E. W Apr 17 '18 at 13:43

1 Answers1

1

If /etc/skel exists on your machine, you can copy those files to your home directory to reset the profile to the default.

l0b0
  • 55,365
  • 30
  • 138
  • 223