Questions tagged [.bash-profile]

.bash_profile is one of the scripts the Bash shell reads and executes when started as an interactive login shell.

When the Bash shell is started as an interactive login shell, the .bash_profilescript (if it exists) is read and executed after the /etc/profile file (if it exists).

167 questions
572
votes
6 answers

Difference between .bashrc and .bash_profile?

What's the difference between .bashrc and .bash_profile and which one should I use?
cfischer
  • 9,163
122
votes
6 answers

How do I modify my Git Bash profile in Windows?

I'm using Git Bash on Windows 7 and would like to set up Bash profile aliases such as alias gs='git status' to make my life easier. How can I do this?
Brian
  • 1,441
  • 3
  • 13
  • 17
97
votes
5 answers

Where to find the .bashrc file on Mac OS X Snow Leopard and Lion?

I want to install rvm on my Snow Leopard machine. It says I need to add a line to my .bashrc file (I'm using bash) but where is my .bashrc file?
Yuval
  • 2,298
61
votes
6 answers

How can I fix a Broken Pipe error?

I recently reinstalled RVM (following the instructions at http://rvm.io) after a fresh install of Ubuntu 12.10 when I got an SSD Drive. Now, when I type: type rvm | head -1 I receive the following error: rvm is a function -bash: type: write error:…
50
votes
3 answers

Environment variables in bash_profile or bashrc?

I have found this question [blog]: Difference between .bashrc and .bash_profile very useful but after seeing the most voted answer (very good by the way) I have further questions. Towards the end of the most voted, correct answer I see the statement…
49
votes
7 answers

MinGW Bash profile

I use MinGW on Windows 7. I have a .bashrc with some aliases in it. The file is in my home folder which is where MinGW starts me in, so it also believes that the folder is my home folder. It does not load the contents of the folder automatically. I…
KurToMe
  • 493
40
votes
8 answers

~/.profile is not loaded when using SSH (Ubuntu)

Edited to reflect the problem I really wanted to solve: I need to set up my ruby environment so I can deploy via Capistrano. export PATH=$HOME/.rbenv/bin:$PATH eval "$(rbenv init -)" I put these in ~deploy/.profile, but when I ssh in, they aren't…
Charles R
  • 531
31
votes
2 answers

Bash not loading '.profile' in new session on Linux

I'm setting up a new Linux machine I got from our IT dept, and noticed .profile is not loaded when I start a new terminal session. The current shell is Bash, though I changed it from the default sh it came with. How do I make it load .profile on…
sa125
  • 1,036
27
votes
6 answers

.bash_profile not sourced

I have a .bash_profile file that I added some stuff to (aliases and color and some git stuff) and when I open iTerm and source it then everything's fine and I have everything but when I close iTerm and reopen it then no colors and no aliases until I…
levtatarov
  • 429
  • 1
  • 4
  • 10
27
votes
3 answers

Is it possible to override the command line's built in "cd" command?

Just about every time I 'cd' to a different directory on my machine (in this case, running Mac OS X 10.6.7) via the command line (which is bash), I immediately type 'ls' to get the list of contents in that directory. I'm trying to figure out a way…
23
votes
2 answers

Execute a command every time Terminal is open

I'm on Ubuntu 13.04 and I'd like to configure my terminal, so that every time a new tab/window is open, it executes the following command automatically and right away. /bin/bash --login How could I achieve this? On OSX with iTerm 2 there is an…
19
votes
6 answers

How to reset Bash on Mac OSX, .bash_profile corrupted and bash no longer works

I am on a MacBook Pro, running the latest version of Mountain Lion. I really need some help, I have managed some how to damage my .bash_profile (I think) so that every time I open up the terminal I get the error listed below. -bash: export:…
17
votes
1 answer

enabling colors in the python interactive shell on OS/X

I have just modified my .bash_profile so as to have colors in iTerm and Terminal. Now, I want to enable syntax highlighting for the Python interactive shell, IDLE-style. How to do that?
emm
  • 213
16
votes
6 answers

How to automatically execute a shell script when logging into Ubuntu

How do I get a script to execute automatically when I log in? Not when the machine starts up, and not for all users, but only when I (or any specific user with the script) login via the GNOME UI. From reading elsewhere I thought it was…
Mike Rowave
  • 1,995
15
votes
2 answers

Mac OSX: Cannot color broken symlinks

On my linux machine, you can tell intact symlinks from broken ones, because broken ones are colored red. I've tried to set this up on my mac by adding some configurations to PSCOLORS in my .bash_profile, but so far nothing has worked. I've managed…
well actually
  • 583
  • 4
  • 8
  • 12
1
2 3
11 12