If you want to use bash-only features, use.bash_profile. Put the common stuff in.profile and the bash-only stuff in.bash_profile, then add if [ -f ~/.profile ]; then. You can edit.bash_profile and comment out the lines that are causing problems or just delete everything to make the entire file empty. Open a plain text editor, for example TextEdit Press Command + o. Hi there, I needed to add a directory to my path. I opened terminal and vi.bash_profile. I was suprised to see it was a new file and there didn't appear to be an existing.bash_profile. Anyways, being a new MAC user I figured that was ok and I added a line to put a directory in my path. I save the file. Now the directory is in my path.good. However, basic commands like ls etc don't work! Command not found. It appears to me as though I've overwritten my whole.bash_profile now. I called tech support to find an original copy of the.bash_profile but they don't support terminal users apparently. Can anyone assist by telling me how I can restore my.bash_profile or point me to an original copy? Or perhaps this isn't the problem and someone can offer a suggestion. Appreciate the help, Marshall. I think you'll find the problem is that the default shell you're running isn't BASH. By default, on the current version of Mac OS X, the Terminal opens in TCSH unless you specify otherwise in your user account in Netinfo Manager. Since its not running bash, its not even using the.bash_profile. You have two options. You can edit the.tcshrc which is the TCSH equivalent of.Bash_profile, or if you really would rather use BASH, you can go into Applications/Utilities/Netinfo Manager, find your user account and change the default shell to bash. I believe you can also change the shell in the Terminal preferences somewhere, as well. I think you'll find the problem is that the default shell you're running isn't BASH. By default, on the current version of Mac OS X, the Terminal opens in TCSH unless you specify otherwise in your user account in Netinfo Manager. Since its not running bash, its not even using the.bash_profile. You have two options. You can edit the.tcshrc which is the TCSH equivalent of.Bash_profile, or if you really would rather use BASH, you can go into Applications/Utilities/Netinfo Manager, find your user account and change the default shell to bash. I believe you can also change the shell in the Terminal preferences somewhere, as well. Weird as I'm running OS X 10.3.9 and the default shell for root is set to sh (bash) as seen from the netinfo manager. I've changed my profile shell default to tsch using the netinfo manager. I'm wondering if I change the root shell to tsch how much damage is that likly to do in terms of path statements? Dropbox not running on mac. If I examine my set command as root (su) but from within my profile it gives me the same path in bash and tsch (tsch is set as shell). Why does the root profile as seen from netinfo manager show as bash if this is the case? But what i really want to know is; 1. How do I set my aliases file so that the shell permanently reads from it. I can't edit the my etc/csh.login file and add in the commands I want as it gives me a read only error. I can use chmod I guess but am unsure if this is the right thing to do. As you can tell I'm new to unix (background is dos and wondoze) so I expect that the questions are pretty obveous if you know the answers. Hi there, I needed to add a directory to my path. I opened terminal and vi.bash_profile.
0 Comments
Leave a Reply. |