Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.profile not working from terminal in mac

I had a .profile file that I was reading and using aliases from in my terminal, but at some point the aliases stopped working for no clear reason (other commands were still working).

Thinking to make a quick fix, I deleted (rm) and recreated my .profile file in my user directory. There are no bash_profiles or others in existence that I can see, at leasts in that directory.

The new .profile did not work. I tried restarting the terminal and the computer.

Now, the commands that worked in the original .profile are still run although I cannot find the file, and the new .profile gives:

No such file or directory(last half of a filename sourced here) and: command not found messages

The .profile file only contains path updates, aliases, and files to source. Trying to source the .profile file also gives the error messages above.

However, typing in the path updates, aliases, and files to source directly into the terminal by copying them from the .profile file works fine.

Help?

like image 952
user2950933 Avatar asked Nov 03 '13 23:11

user2950933


People also ask

Where do I find .profile on 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.

What is the .profile file in Mac?

Shell profile used by Linux and Mac OS X terminal programs; contains definitions for a shell environment, such as environment variables, scripts to execute, and other instructions; used for storing pre-defined settings that are loaded when a shell program starts.


1 Answers

Perhaps you have a .bash_profile or .bash-login file in your home directory and it's being read in preference to your .profile settings?

Take a look here: How to make OS X to read .bash_profile not .profile file

like image 134
r3mainer Avatar answered Oct 05 '22 22:10

r3mainer