Home > El Capitan > Mac Os X Bashrc Not Working

Mac Os X Bashrc Not Working


The former is loaded when the shell is a login shell; the latter when it is not. I could easily argue both sides but this doesn't help either. Not the answer you're looking for? Explicit formula of base change for GL(n) Flat renting in Berlin for medium-term period How would you say "to scold" in a less formal way?

Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the The local per-user specifications "~/.bashrc" should start with the following snippet, to read and load the system-level bash settings: if [ -r /etc/bashrc ]; then . /etc/bashrc fi I normally add Recommendation Most of the time you don't want to maintain two separate config files for login and non-login shells -- when you set a PATH, you want it to apply to share|improve this answer answered May 5 '15 at 0:55 Ricardo 1032 This is little more than a rehash of the answers from four years ago. –G-Man May 5 '15

Mac Bashrc Or Bash_profile

Had ground rod connection added to my electric panel, should old ground to copper water pipe be disconnected? To check if your ~/.profile already does this enter nano ~/.profile. In the terminal enter cd ~; nano .bash_profile.

ls -F is the obviously correct solution. I'm sure there are many ways to skin this cat. But then I went to the menu drop-down Edit > Profile Preferences, Title and Command tab, and selected Run command as a login shell from the command section of that page. Mac Bashrc Example How could Weyoun be present during signing of peace treaty?

Alas, I'm not exactly sure how they were designed to be used. :-P I use tcsh, so I copied all of my old .tcshrc file into .tcsh_profile and combined the calls Osx Bash_profile Is it crazy to leave a tenured position for a non-tenured but tenure-tracked job? Had ground rod connection added to my electric panel, should old ground to copper water pipe be disconnected? http://apple.stackexchange.com/questions/12993/why-doesnt-bashrc-run-automatically Pretty simple.

interactive login shell vs interactive non-login shell vs non-interactive shell) is confusing, and it's broken and overridden by many Unixes and shell scripts. –Stefan Lasiewski Jun 1 '10 at 19:46 | Bash_profile Not Loading Mac Another fun tip: When using mac's Iterm2, importing color profiles will render the coloring of the files and folders immediately according to your color scheme after having this "/etc/bashrc" option set. it doesn't work. This issue has been gnawing me for months! -- Ankit Agrawal, March 1, 2007 Wouldn't this cause problem if you run one script from the other in both of them?

Osx Bash_profile

up vote 73 down vote favorite 34 I want to install rvm on my Snow Leopard machine. http://superuser.com/questions/479703/profile-and-bashrc-doesnt-work-on-my-mac If you do not see a line anywhere that says source ~/.bashrc, then enter the following lines somewhere (put it in a reasonable place like at the end or beginning and Mac Bashrc Or Bash_profile Try chmod -x ~/.profile and see if it still works. –Keith Thompson Nov 4 '11 at 0:15 add a comment| 5 Answers 5 active oldest votes up vote 34 down vote Bashrc Mac El Capitan In general, if you're using Bash you should prefer .bash_profile unless you are careful to ensure that your startup code does not contain anything that depends on Bash.

Doubly confusing because once you add an export statement to append the new directory to the existing PATH ... This is why "put source ~/.bashrc in your .bash_profile" is standard advice I usually just put the things that I'd normally put in ~/.bashrc to ~/.profile — has worked so far A couple of side notes: The period in front of the file marks it as invisible to Finder and the ls command by default. I tested the if/then contruct in my ~/.bash_profile and, sure enough, I get my fancy PS1 settings and all my aliases. -- Bill, April 17, 2007 Why not just hardlink .bashrc Bashrc El Capitan

These files have different purposes. Plus a small contribution - since the other mentioned files were not available on my OS Yosemite. –Ricardo May 5 '15 at 19:23 add a comment| Your Answer draft saved There is no profile file. How do you put a reference next to image?

To keep the environment consistent between non-login and login shells, you must source the .bashrc from your .profile or your .bash_profile. Mac Edit Bashrc more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed The need: Add a directory to PATH on OSX 10.8 (ML).

PATH=$PATH:/my/private/binaries will lead to PATH bloat.

On every platform (not just Mac OS X) bash does not use .bashrc for login shells (only /etc/profile and the first of .bash_profile, .bash_login, .profile that exists and is readable). check whether this files have a proper permissions –shuvalov Aug 14 '10 at 17:48 yes... bash_profile/bash_login/profile/whatever else is for login shells. .bashrc Mac El Capitan After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable.

And this has security benefits, IIRC, with regards to things that get logged to the system log (mostly to do with su/sudo, I'd have to look it up). .bashrc is also I think this is a OS X Lion related problem, because before the upgrade from Snow Leopard, I didn't have the same issue. This site is not affiliated with or endorsed by Apple Inc. So you have two options: Put the alias in your ~/.bash_profile Or source your .bashrc from your .bash_profile by adding this line to the .bash_profile: . ~/.bashrc share|improve this answer answered

Doesn't this result in some sort of recursive stack overflow? -- Tom, April 16, 2007 I absolutely despise coloring ls output. What is a login or non-login shell? more hot questions question feed default about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts Culture / Recreation To make these changes, open ~/.bash_profile … vim ~/.bash_profile … andadd: # Set architecture flags export ARCHFLAGS="-arch x86_64" # Ensure user-installed binaries take precedence export PATH=/usr/local/bin:$PATH # Load .bashrc if it

Browse other questions tagged osx bash terminal osx-lion or ask your own question. If you put it in your .bashrc, you'd see it every time you open a new terminal window. Trying to Google for an explanation isn't too easy. –shamess Jan 6 '13 at 2:23 13 From man bash: -s file True if file exists and has a size greater But ls -F is horrible IMO: those tacked on characters make files look like they have wonky names, to the extent that novice users even try to type them in as

Source : http://www.gnu.org/software/bash/manual/bashref.html#Bash-Startup-Files schacon added the Technical label Oct 22, 2014 Sign up for free to join this conversation on GitHub. To be honest the distinction between .bashrc and .bash_profile is not well understood by the community. Related 110Why doesn't .bashrc run automatically?14sourcing bash profile for root users2Why doesn't the screen command source my .profile?3Does Mac OS X's bash read scripts for all users (tab-completion scripts) from /opt/local/etc/bash_completion.d However, you need a root account to modify it.

After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable. Not the answer you're looking for?