Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mac Terminal error: -bash: /Users/tim/.profile: No such file or directory

Tags:

terminal

Every time I open a new Terminal window I see the following.

-bash: /Users/tim/.profile: No such file or directory 

I have no idea why this is happening or where to look to fix it; my profile is located at /Users/tim/.bash_profile not /Users/tim/.profile

Any thoughts on how to troubleshoot this?

like image 413
timgavin Avatar asked Oct 20 '16 14:10

timgavin


People also ask

Where can I find .profile file in Mac?

View an installed configuration profile On your Mac, choose Apple menu > System Preferences, then click Profiles . If you haven't installed any configuration profiles, Profiles preferences isn't available. Select a profile in the Profiles list to view information about it.


2 Answers

This happened to me as well and I noticed that at the top of my .bash_profile it had:

source ~/.profile 

My understanding is that on MacOS / OS X .bash_profile is given priority over .profile so the latter file isn't required.

To fix therefore I simply removed source ~/.profile from the top of the file.

Hope that helps.

Edit: original poster commented that he just created a blank .profile to solve this as well.

like image 162
nocabt Avatar answered Sep 23 '22 13:09

nocabt


I met the same issue today, i guess it's because i use the cleaning app and the app considered this file was a waste of space so deleted it. touch ~/.profile helps me.

like image 30
J.Wang Avatar answered Sep 23 '22 13:09

J.Wang