My home directory now appears as a link and my .bash_profile file isn't in the /users/myusername folder? Where did it go? What happened? Commands such as flutter and dart no longer work but built in commands such as ls and cd do.

  • What do you mean by "the folder"? Are you talking about /bin/? Jun 21 '21 at 23:11
  • I'm still fairly new to macs so please bear with me! I thought that .bash_profile lives in the home folder? Anyway, something bad has happened! and I can't run any of my commands nor open bash profile; I did have an alias for my bash profile though so possibly I'm going to the wrong place...but I still can't find it.
    – atreeon
    Jun 21 '21 at 23:14
  • If I do vi ~/.bash_profile it creates a new file
    – atreeon
    Jun 21 '21 at 23:16
  • @unbeatable101 any ideas of what could have happend? There are a couple of files in /bin/ but not my .bash_profile file. I think the /bin/ is the trash folder right? What could have happened?
    – atreeon
    Jun 21 '21 at 23:27
  • @atreeon /bin/ is a folder containing some of the binaries, or executables that you can run via terminal. Do you have a backup where you can restore your bash_profile?
    – At0mic
    Jun 21 '21 at 23:37

.bash_profile includes some export PATH=..., aliases and custom functions. If the file no longer exists or has been moved then those commands will no longer work. The default /bin commands such as ls and cd won't be affected.

My file was moved (possibly by a problem with Visual Studio Code).

There is no automatic backup of this file but this may help How do I restore my .bash_profile?

In my instance luckily my bash profile file had been moved. The reason I couldn't find it was that 'finder' does not find hidden files (!). Doing a simple terminal find found the file for me.

sudo find . -name ".bash_profile"
  • 3
    You shouldn't need sudo for this.
    – nohillside
    Jun 22 '21 at 11:33
  • 1
    there were a couple of folders that showed a permissions error without it. I agree the file would never have been in those folders however the output was more readable without those messages displayed so found it helpful
    – atreeon
    Jun 22 '21 at 11:36

You must log in to answer this question.

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