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

learn more… | top users | synonyms

5
votes
1answer
51 views

Execute same command for each non-interactive bash session

I need to implement some config - I need to execute some code, if someone on my system calls for bash command in any form (interactive, non-interactive and bash -c form). For example this is command I ...
0
votes
0answers
28 views

bash how to remove “__bp_precmd_invoke_cmd” error?

I get after each command the error bash: __bp_precmd_invoke_cmd: command not found even after the command is successfully executed. e.g. if I run the ls command I get the proper listing of the ...
0
votes
1answer
43 views

Where is .bash_profile?

I'm trying to follow the instructions here: http://www.ladysign-apps.com/developer/mac-osx-run-sublime-from-your-terminal/#.Vj0ZfYRqmj4. Where is .bash_profile located? I see a .bash_profile.swp in ...
0
votes
2answers
50 views

.bashrc/.bash_profile not loading export

I'm trying to compile code and in order to get it to work I need to run the following line before compilation: export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig After this the code compiles normally, ...
0
votes
0answers
48 views

Git related Issue with Terminal commands on my Mac OS X 10.10 (Yosemite)

My question follows a previously answered question in this forum. But I have an even stranger problem. The same screenshot about Git command requiring Xcode installation is appearing on my Mac OS X ...
0
votes
1answer
8 views

Add a command to user terminal profile?

Every time I start a new terminal, I have to type nvm use 4.1.1 to get my node version selected. Is there a way to get this to be 'typed' or added to some environment variable when I open a new ...
0
votes
0answers
10 views

Running bash_profile on reboot terminal

If I have a terminal (iTerm2) open on reboot, and ask for OS X to reopen currently open windows on start, it will reopen my terminal in the same directory, but .bash_profile won't be run. why? and ...
1
vote
1answer
634 views

Why does mac iterm and iterm2 not source .bashrc or .bash_profile?

I have ready many posts related to login/non-login and interactive/non-interactive. It would be my understanding that .bashrc should be sourced from iterm - which is interactive logon shell. It is ...
2
votes
2answers
85 views

Is there a way to make my .bash_profile load the contents of my .profile file?

I was using a .profile quite happily for two years on my Mac now running Yosemite. A recent brew install created a .bash_profile and whilst my .profile still exists, it is now no longer loaded. I ...
0
votes
0answers
64 views

Running 'su - user sh -c “~/.profile”' returns “No such file” error

I have a shell script running as root with the following command: ssh remotehost 'su - user sh -c "source /home/user/.profile; <command>"' I get the following output: bash: su - user sh -c ...
0
votes
1answer
42 views

Is there a standard place to put my Aliases? bashhrc vs. bash_aliases

Is there a standard place to put custom aliases? If not, what are the benefits and disadvantages of .bash_aliases, .bashhrc, and .bash_profile?
1
vote
2answers
74 views

Create PATH for OS X Python virtualenv install

I'm a Terminal and Python newbie, but I'm using virtualenv a lot right now for a Python project. Changing directories manually to source the virtualenv in my filesystem is quite tedious, so I'm ...
2
votes
1answer
41 views

Removed lines in .bash_history are still listed in history command. How to load the changes?

I removed command lines in my .bash_history. The problem is that when I execute the history command the deleted commands are still listed. How do I load the changes ? I tried source .bashrc and ...
0
votes
2answers
57 views

Creating a bash routine

Everytime I log in into my work machine, I have to open a terminal and type the same routine: $ cd /Documents/some_folder/some_another_folder $ vagrant up $ vagrant ssh I'd like these commands to ...
1
vote
1answer
254 views

Non-interactive ssh sessions don't have PATH set on some systems

I set my environment in .profile. My .profile is idempotent and .bash_profile, .bashrc, .kshrc and .zshrc all source .profile. That way I always get the same environment regardless on what ...
0
votes
1answer
61 views

Mac .bash_profile.save How to make it run by itself / where to actually change paths

trying to change my path for Ruby / SASS. I have always used a file in my home called '.bash_profile.save' In there I have the export paths which work fine but only when I run: source ...
0
votes
1answer
50 views

Bash file error

When I type "./" followed by a file name, how do I find out which program is executing it? ie. I have some scripts like "derp.sh" that will execute if I type "/bin/bash derp.sh" but fail if I write ...
2
votes
1answer
109 views

In bash 4.3.27 “su” ignores user variables when combining “-” with “-c command”?

Since forever we used to launch user scripts from a different user crontab like this: 00 12 * * 1 su - user2 -c "/home/user2/myscript.sh" By doing this, the script is launched after the interactive ...
0
votes
2answers
91 views

Why do I add a path to ~/.bash_profile and source it, but there's no effect?

In my install.sh: # other commands to install java... echo 'export JAVA_HOME="/usr/java/latest"' >> ~/.bash_profile source ~/.bash_profile After this script runs, I type echo $JAVA_HOME, but ...
0
votes
1answer
962 views

How to install the debian bash-completion using homebrew?

I want bash to install bash command completion on my mac using brew.
0
votes
1answer
57 views

Configure bash_profile for one single terminal emulator

I am using a new terminal emulator. Terminology is the E17 default terminal, and it has a great command: tyls which is a "graphical" ls I want to create an alias just for this terminal, because the ...
0
votes
0answers
113 views

Entered wrong .bash_profile and now my laptop is running hot

I am just learning how to use the command line and was editing the bash prompt setting in .bash_profile. I made an error in the prompt settings in .bash_profile and I lost the prompt and the ability ...
0
votes
0answers
118 views

How to permanently make the Output of python codes to appear in a different color in the terminal?

I found it really annoying when I use terminal that everything is in one color. I am looking for a way to print the output of my python code in a different color on the terminal console, so it will ...
3
votes
1answer
856 views

How can you remove duplicates from bash history?

Since I'm saving history from different sessions this is an issue where erasedups can't help because I'm using the following: PROMPT_COMMAND="$PROMPT_COMMAND;history -a" Is there an easy way to ...
0
votes
1answer
53 views

How to store setings

I have made my .bashrc give me two types of prompts; longp: xanth@X-VboxTux:~➤➤➤ and shortp: ➤ I have done this by writing a 0 or a 1 to a file and then to determine what prompt should be shown ...
0
votes
1answer
21 views

BASH Variable substitution(?)

I have the following script: var1="var1value" var2="var2value" var3="var3value" I want to create the following code: option=$1 myvar=`echo var$option` So, when the option is "1" the myvar ...
0
votes
1answer
276 views

osx - change terminal-color based on user

what i want to achieve : everytime i log onto a machine via ssh with a specific user -> "danger" like ssh danger@somehost i want the terminal to change its background to red, so i have a visual ...
1
vote
1answer
579 views

Can .bash_profile automatically run without sourcing it in iTerm2?

I am using iTerm2 in Mavericks OSX and made sure I updated to the latest version. My working directory inside preferences is set to Home Directory. I was watching a tutorial on iTerm customization ...
0
votes
0answers
68 views

Unix commands not working

Recently been trying to install mysql and changed my bash_profile around a few times. My unix commands seem to be unresponsive to any of my commands. Need some help to get it back up and running. ...
0
votes
1answer
719 views

Can't use command line – “command not found” after editing PATH

I'm running OS X Mavericks and was trying to install MAMP PRO 2.2. I was trying to configure the PATH variable to have the PHP binaries of MAMP PRO. I added the following line on my ~/.bash_profile ...
1
vote
2answers
1k views

-bash: __git_ps1: command not found

I recently uninstalled Homebrew and Cellar (web dev applications), and this error now appears after every Terminal command (although I can't confirm that these are the culprits!): -bash: ...
0
votes
1answer
1k views

Recover lost .bashrc

So I did something exceedingly stupid and now my .bashrc file is gone. Is there any way for me to recover it? I still have a terminal window open that uses the old bashrc file. If there's no way for ...
1
vote
1answer
137 views

Alias for viewing logs with todays date

I want to create an alias: alias readFile='ls file1.todaysdate' where todaysdate is in format 130714. How would i do this?
2
votes
1answer
3k views

.profile and .bash_profile ignored when starting tmux from .bashrc?

I've been having an issue with getting my .profile to be sourced when SSHing into an Ubuntu 12.04 server instance. My .bashrc does the following towards the end: if [[ "$TERM" != "screen-256color" ]] ...
-1
votes
1answer
202 views

Can't load a .bash_profile on windows powershell

I'm looking to load a .bash_profile with some aliases and functions on launch but, I haven't been able to find a way to load the .bash_profile. I'm not even sure if it is possible.
4
votes
2answers
10k views

How do I create a terminal shortcut to this path?

So I'm having a problem creating a shortcut to a deep folder. None of the examples I've seen on Superuser have helped :( This is my path: cd / Applications / MAMP / htdocs / whoat / solr / whoat I ...
2
votes
1answer
136 views

Script acting strange in bash_profile (but just under X)

I have made a simple .sh script which checks every minute whether a particular file is empty or not, and if it is not empty, makes a led on my laptop blink at 0.5Hz. I call this script from my ...
30
votes
2answers
34k views

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?
3
votes
1answer
3k views

Error when installing and trying to get version of SASS via Terminal

Not sure what is going on, I was able to install git via the terminal (had to create a bash_profile). Now I installed ruby and did install sass. However when I did sass --version I got a bash error? ...
2
votes
1answer
201 views

Sort out where to put my bash commands, alias, and configurations

It seems to me that every Linux distro that I SSH into or use locally (Mostly RHEL/CentOS and Debian/Ubuntu machines) have a different idea about which of .bashrc and .bash_profile to run when I log ...
0
votes
2answers
194 views

.bash_profile wont run on login

I am trying to set up my computer so that the escape key performs the caps lock function and caps lock performs the escape key function. I have a small script to swap my escape and caps lock using ...
1
vote
3answers
225 views

bash: repeatedly executed script in .bash_profile blocks login

I have a bash script (let's call it script.sh) which looks like this while true; do if [ $someFile -eq = "1" ] then # make laptop LED blink here fi done So when some file has some value ...
0
votes
1answer
599 views

Command line in OSX breaks when I edit bash_profile

Please help me, I am learning how to add sublime to command line from this link and when I created .bash_profile file, in the first line I typed export PATH= and saved it. My command line is broken. ...
0
votes
1answer
150 views

OS X - Adopt “command not found” behavior from Ubuntu

There is a question about overriding the default command not found behavior on Ubuntu. It is Here. I tried adding the following to ~/.bash_profile, /etc/bashrc and /etc/profile, but no luck: function ...
4
votes
5answers
7k views

.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 ...
6
votes
4answers
10k views

~/.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 ...
0
votes
1answer
207 views

Fix bash_profile to Develop Ruby on Rails Apps

I just installed Ruby and Rails stuff on my machine, and start to learn. But every time I close the Terminal and re-open it, I have to re-type the command . ~/.bash_profile in order to run Rails ...
-1
votes
1answer
40 views

If environment settings are to be made persistent, where should I store them? [closed]

I want to make environment settings persistent. Where should I store them? I'm confused.
1
vote
3answers
440 views

Is it possible to set color for the user input in bashrc?

Note that I only want user's input to have specific color (words that user has typed with keyboard), not the actual command's output. I tried: export PS1="$ \033[38;5;154m" I know that it should ...
10
votes
2answers
28k views

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 ...