Hello I am following this. I'm installing Python onto my mac so that I can set up a Django / Eclipse development environment. However I am not too sure how to go about executing this step:. The script will explain what changes it will make and prompt you before the installation begins.
Once you’ve installed Homebrew, insert the Homebrew directory at the top of your PATH environment variable. You can do this by adding the following line at the bottom of your /.bashrc file. export PATH=/usr/local/bin:$PATH Where do I find the bashrc file on my mac and where do I find the homebrew directory? I am running a macbook pro with OS 10.8.5.
Mac terminal cannot not execute.bash_profile. Ask Question. Is your.bashrc sourcing your.bash_profile? Iirc the mac terminal doesn't start as a login shell but I forget the rule about which is sourced automatically when as I'm sourcing my.bash_profile under Linux. Sep 16, 2013 - If you want to check that your ~/.bash_profile is being sourced, either at startup as it should be, or when you source it manually, enter the.
The.bashrc file is in your home directory. So from command line do: cd ls -a This will show all the hidden files in your home directory. 'cd' will get you home and ls -a will 'list all'.
In general when you see / the tilda slash refers to your home directory. So /.bashrc is your home directory with the.bashrc file. And the standard path to homebrew is in /usr/local/ so if you: cd /usr/local ls grep -i homebrew you should see the homebrew directory (/usr/local/homebrew).
Yes sometimes you may have to create this file and the typical format of a.bashrc file is: #.bashrc # User specific aliases and functions.alias alias ducks='du -cks. sort -rn head -15' # Source global definitions if -f /etc/bashrc ; then. /etc/bashrc fi PATH=$PATH:/home/username/bin:/usr/local/homebrew export PATH If you create your own.bashrc file make sure that the following line is in your /.bashprofile # Get the aliases and functions if -f /.bashrc ; then. /.bashrc fi. I would think you should add it to /.bashprofile instead of.bashrc, (creating.bashprofile if it doesn't exist.) Then you don't have to add the extra step of checking for /.bashrc in your.bashprofile Are you comfortable working and editing in a terminal?
Just in case, / means your home directory, so if you open a new terminal window that is where you will be 'located'. And the dot at the front makes the file invisible to normal ls command, unless you put -a or specify the file name. Check for more detail. /.bashrc is already a path to.bashrc. If you do echo you'll see that it's a path to your home directory. Homebrew directory is /usr/local/bin. Homebrew is installed inside it and everything installed by homebrew will be installed there.
For example, if you do brew install python Homebrew will put Python binary in /usr/local/bin. Finally, to add Homebrew directory to your path you can run echo 'export PATH=/usr/local/lib:$PATH' /.bashrc. It will create.bashrc file if it doesn't exist and then append the needed line to the end. You can check the result by running tail /.bashrc.
Mac Bash Profile Location
From what I gather from the bash man file,.bashprofile is for and interactive login shell and.bashrc is for a non-login interactive shell. I adjusted.bashrc to add to my path and add an alias and opened a new Terminal window and nothing happened. So I put the changes into.bashprofile instead and opened a new Terminal window and the changes took effect.
I then started Apples X11 app which opens an xterm. The changes from the.bashprofile file did not take affect. I had to put the same changes in the.bashrc file for them to work in the xterm. So now both my.bashprofile and.bashrc files are exactly the same. This does not make any sense to me.
Can someone please explain the differences to me and why Terminal and xterm work differently in this fashion? Good question. I really don't understand the difference either. I have my aliases and commands to turn on color in the terminal in.bashrc. The only problem was that my aliases didn't work. I had to put 'source $HOME/.bashrc' into my.bashprofile. It seems that at startup,.bashprofile is read, and then that file points to.bashrc.
Bash Profile File
You should be able to do the same (put source $HOME/.bashrc into.bashprofile) and put only the commands into.bashrc. The only reason I did this was because I found a link somewhere that said to do this and it worked.