In .profile, why is alias not working?
Recently (since upgrading to Mavericks??), several alias commands in ~/.profile are not working after I start Terminal (although numerous path settings set up there are working as expected). For example, ~/.profile includes:
alias mysqlctl='sudo /usr/local/mysql/support-files/mysql.server'
alias mysqlstart='mysqlctl start'
But after I start Terminal and execute
mysqlstart
I get error:
bash: mysqlstart: command not found
I know that something peculiar is going on because when I attempt to exit the (one and only) running Terminal session with command exit I just see an echoed response
exit
but can quit Terminal by executing the same exit command again.
Moreover, if in Terminal I execute
source ~/.profile
then the aliases work as expected.
I did try the ruse I found somwhere of including before any of the other alias lines in .profile the command alias sudo='sudo ' but that doesn't fix the problem.
I thought perhaps some other startup file is being read and hence commands in ~/.profile are therefore not being executed, but I find no such: I have no
~/.bashrc or ~/.bash_profile or ~/.login file. (And Terminal is set to use the default login shell, which is bash.
What could be wrong and how can it be fixed?
iMac, OS X Mavericks (10.9), 3.4GHz Corei7, 16GB, SSD + 2T HD