.bash_profile is one of the scripts the Bash shell reads and executes when started as an interactive login shell.
2
votes
1answer
41 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
46 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 ...
0
votes
3answers
39 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
53 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
54 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 ...
2
votes
2answers
90 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 ...
0
votes
3answers
178 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
38 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
31 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
1answer
48 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 ...
4
votes
1answer
852 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 ...
0
votes
1answer
47 views
bash_profile and svn
I'm a bit new to the Unix environment and am having trouble with my bash_profile and svn. Basically my bash_profile only contains information about coloring the terminal. However, when I make the ...
0
votes
4answers
116 views
Unable to make bash default shell in freebsd
I wanted to change my default shell to bash in freebsd. I tried the following:
1.chsh -s /bin/bash (or /usr/local/bin/bash) <my_username>
I get this error after entering the password: chsh: ...
4
votes
2answers
167 views
why error code 1 returned by loading .bash_profile in Mac
Whenever I open a bash terminal, the error code 1 is returned:
Last login: Tue Jan 15 16:19:53 on ttys000
spam@moss:~ $ echo $?
1
I found this is caused by last line of code in my .bash_profile:
...
0
votes
2answers
109 views
Change bash_profile path order
To use the right PHP version on my command line I want to change the $PATH of my command line profile.
For now, the command line uses the standard system php file located in /usr/bin/. I want to
use ...
4
votes
2answers
2k views
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 ...
1
vote
1answer
467 views
Where can I find bash_profile / bashrc themes?
I've been searching for bash_profile / bashrc themes on google for awhile but I'm not finding any kind of aggregation for themes. Most of them I find are small snippets like:
export ...
2
votes
0answers
122 views
Why does this line appear every time I launch iTerm on my MacBook?
So I use iTerm on my MacBook Air and also my MacBook Pro. I've been playing around with .bashrc and .bash_profile and trying to come up with clever ways to configure things. At one point I decided I ...
2
votes
1answer
188 views
How to make alias/function in .bash_profile for `curl` that takes an argument?
I found this tip super helpful, for using curl to resume an interrupted file copy.
The full syntax is:
curl -C - -O file:///Volumes/path/to/file
I would like to add an alias or function called ...
1
vote
1answer
75 views
Custom prompt doesn't work on Mac's terminal
I like to use a custom prompt (current path in blue) on my unix machine:
export PS1='\[\e[0;34m\]\w \$\[\e[m\] '
But when I try to use it on Mac's terminal it doesn't work: it fails to detect the ...
2
votes
1answer
45 views
Why am I not able to add directory in linux $PATH
I am trying to add ~/.bin into my path and for that I edited the .bash_profile and added the below line
PATH=$PATH:$HOME/.bin/
and than I logged out/in.
Now when I do echo $PATH I get
...
0
votes
1answer
137 views
Enabling Shell colours through Putty SSH
I have set a number of configurations in my .bashrc file to set the appearance of shell on my Redhat machine. However, when I login as root using Putty, the colours are not shown.
I can enable them ...
0
votes
1answer
166 views
Error in .bash_profile
I am using CentOS 6.2. This is my ~/.bash_profile content:
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup ...
1
vote
2answers
124 views
Default file extensions in .bash_profile
I use Mac OS Lion and I would like to declare in my .bash_profile the file extensions and the default application to open them.
For example, I want to associate all .txt files to TextMate so that ...
-2
votes
3answers
317 views
How to change $PATH?
I am not able to find 'ifconfig' command, So I need to modify $PATH variable. Can you provide the best way to modify $PATH varible, whenever I logged-in.
[aaa@cyclrtp10 ~]$ ifconfig
ifconfig: Command ...
0
votes
1answer
58 views
Bash Profile Coloring
I would like to make a few changes to my bash profile. Changes I would like include:
Coloring Files: I would like files with the execute permission bit set to be colored green.
I would like to ...
0
votes
1answer
338 views
0
votes
1answer
171 views
Bash Prompt Not Showing Colours (git)
I have the following in my .bash_profile, to give me git branch info in my bash prompt:
# Configure colors, if available.
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
...
0
votes
2answers
405 views
bash alias doesn't carry over with sudo
I'm curious if there's a way to get my .bash_profile to work when I sudo a program.
For example, I have it set to alias emerge='emerge -av' so that I can install software, and it will always ask me ...
0
votes
3answers
369 views
All terminal commands (like ls, cd, edit, open) are returning errors on my Mac [duplicate]
Possible Duplicate:
How do I reset the $PATH variable on Mac OS X?
From what I can tell from reading other questions/answers is that my .bash_profile file may be corrupt. If I type
...
0
votes
1answer
368 views
Terminal not working: -bash: exit: with: numeric argument required what to do?
I was trying to install F# compiler and interactive on my Mac, and part of the installation process required providing aliases in the bash profile file.
I suspect that I messed something up here, ...
0
votes
1answer
568 views
brew doctor giving error on a directory that has been removed
I just installed homebrew and as suggested, I ran the brew doctor command. I am linux newbie and do not know how to fix most of these things. But I would like to ask especially about the following ...
1
vote
1answer
2k views
To set PATH on OS X when export PATH= don't work
I can't do 'export PATH=' When I try that only .swp files is created (.bash_profile.swp and .bashrc.swp). I'm on OS X 10.6.
$ echo $PATH
...
0
votes
2answers
1k views
Explain why .bash_logout won't run commands?
So I've been wondering how to run these two lines of code everytime I close an open instance of Terminal:
history -c
cat /dev/null > ~/.bash_history
I export HISTFILE=5 on startup, but still ...
1
vote
2answers
6k views
Edit .bash_profile in OS X
How do I edit the bash_profile? I've tried using the command chflags but it shows the error
[Error writing. Bash_profile: Operation not permitted]
I'm using OS X Snow Leopard 10.6.8.
7
votes
2answers
7k views
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 ...
7
votes
2answers
3k views
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 ...
3
votes
2answers
177 views
Why does bash sometimes think my $HOME isn't the correct directory?
Like the title says it seems that bash sometimes misidentifies my $HOME. This cropped up after a seemingly unique series of events that I will now replay in broad strokes.
Running OS X 10.6 with ...
2
votes
1answer
260 views
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 ...
2
votes
8answers
278 views
Command to search programs in Linux
Do you have any easy idea to define some alias in .bashrc for finding some command that you want to search (when you forgot its name) in your machine, visiting all "bin" directories, maybe using ...
1
vote
1answer
97 views
Accessing your bash profile and history anywhere - via the internet
I'm curious if anyone has tried to tackle the task of having non-sensitive parts of their bash (or other shell) profile made available anywhere they go.
I worked for a company for a time that did ...
1
vote
0answers
419 views
Why does OS X Lion's terminal treat the PS1 prompt codes differently than Snow Leopard?
I get different behaviors in terminal with the same prompt definition in Snow Leopard and Lion.
On my Snow Leopard system, I define my terminal prompt in .profile as follows:
export ...
0
votes
2answers
555 views
Mac OS Lion Terminal: Add blank line after command output?
How can I configure my .bash_profile to add a blank line after any command output?
0
votes
2answers
122 views
command line alias versus .bash_profile alias
when I create this alias from the command line everything works fine
alias ejecta='for I in 1 2 3; do /usr/sbin/diskutil unmountDisk disk$I;done'
When the same alias is created in .bash_profile. the ...
0
votes
2answers
8k views
Mac OSX Lion Terminal ~/.bash_profile Permission Denied
I am an extreme beginner at Terminal. I was trying to root my Android phone. I altered something after typing in ~/.bash_profile. I did it incorrectly. Now I need to reenter it to do it correctly and ...
5
votes
1answer
1k views
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?
0
votes
1answer
213 views
Chaining terminal commands in .bash_profile [duplicate]
Possible Duplicate:
On a Mac, how can I group together commands I want run into a alias?
I have been using aliases for a while now but can't seem to figure out how to 'chain' commands ...
2
votes
5answers
223 views
Multiple-command alias enters bash shell but fails to navigate to path
I have this alias defined to run bash then navigate to a certain folder but when I run it, it only runs bash and stays in the current path/directory/folder.
I've defined them in two different ways in ...
0
votes
5answers
159 views
Bash: Switching from user to root causes issues with prompt
I am on a Mac, running Snow Leopard (if it matters). I am customizing my bash prompt to display things that get pulled from user specific places. For example, I am using Ruby Version Manager to manage ...
1
vote
2answers
302 views
Set ls to return colored results by default
In my .bashrc I have the following lines to turn on colors for grep and ls
alias ls='ls --color=auto'
export GREP_OPTIONS='--color=auto'
I've tried changing the alias to export ...