.bashrc is one of the scripts the Bash shell reads and executes when started as an interactive (but not login) shell.

learn more… | top users | synonyms (1)

-1
votes
0answers
12 views

Use ssh config localcommand to auto scp file from proxy to remote destination

I connect to a work proxy, from my home, to get to a work destination. This proxy is a jump host. I want to share my bash configs from the proxy(as master) to all the sub hosts i connect out to. Im ...
0
votes
1answer
7 views

lost virtualenv display to the left of bash prompt

I added thy Holy prompt to display my current branch so I never push to master. We all use it and it works, but I am no-longer seeing what virtualenv I'm using at the moment, which is a hassle. Based ...
-1
votes
1answer
13 views

Prevent .bashrc from running when starting a new xterm instance

I am running CentOS 6.6, and occasionally when I spawn a new xterm window, I don't want the xterm instance to source .bashrc. Is there a way to do this?
3
votes
0answers
12 views

Wrap git's shell script to add bashrc or equivalent start-up commands

My server has a git user that handles all git access. You can't log in with it. It's only for git access. That works because GIT comes with a handly shell /usr/bin/git-shell. Login feedback: fatal: ...
0
votes
1answer
28 views

My bash script's if / then check is always evaluating to true

I was trying to write a bash script to handle a conditional switch, and it kept evaluating to true every time. So, I stripped it down to this, and I was getting the same behavior of it always echoing ...
4
votes
3answers
44 views

Periodically source shell profile

I'm a zsh user, but this should apply to any shell in theory. When I edit my .zshrc to add a new alias, I have to source ~/.zshrc in all of my open terminal tabs/windows to be able to use the new ...
0
votes
1answer
159 views

Bash autocomplete behaviour in Debian 8

On a new install of Debian 8 (Jessie) I have found that the autocompletion in bash, using the tab key, has changed. The test I did was: Open a terminal (in my case Konsole). Above the prompt it ...
0
votes
0answers
52 views

source ~/.bashrc No command 'some' found, did you mean:

I just recently installed ubuntu 14.0.4 and I'm not sure why I can't source my ~/.bashrc. Whenever I issue source ~/.bashrc I get: No command 'some' found, did you mean: Command 'tome' from ...
2
votes
1answer
381 views

How does one define aliases for use within MobaXTerm *local* bash shell?

I have been using MobaXterm for the last couple of weeks in Windows and I love it. However, I haven't quite figured out how to define my own aliases for use within the local bash shell. The obvious ...
1
vote
1answer
27 views

Automatically kill tmux session on session end?

I have the following snippet in my .bashrc which starts tmux whenever I'm at the command line: # Start inside tmux if [[ $(command -v tmux) ]] && [[ -z $TMUX ]] && [[ $TERM != ...
5
votes
1answer
85 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 ...
1
vote
0answers
59 views

.vimrc sourcing another leads to plugin errors

Since vim or vim-pymode does not seem to work with both python 2 and 3 at the same time I thought I make an alias for my newly compiled vim version specially for developing python 3. So I added this ...
0
votes
2answers
70 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, ...
1
vote
1answer
1k 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
1answer
116 views

Auto source a script after sudo su

I am working on a machine that has some user accounts that are dynamically generated, and therefore I can not user customize the .bashrc or .profile. I frequently need to use these accounts to change ...
0
votes
0answers
19 views

Switch to user2 and load user1's bashrc automatically?

I want to switch to user2 from user1 and then instantly load user1's bashrc. For example: sudo su user2 And then as user2 run this cmd: source /home/user1/.bashrc I'm aware that maybe I shouldn't ...
1
vote
1answer
195 views

running remote command with arguments and shell using ssh

I'm trying to execute a remote command using ssh. I need the shell that executes the command to load .bashrc, so so far i've learned that i can use bash -lc for that. the problem is that it allows me ...
0
votes
1answer
295 views

How to access Solarized color values within bash script

I'm trying to make my bash PS1 prompt colors according to the Solarized theme. I have solarized installed and working for iTerm2, but so far have been unsuccessful in creating a custom PS1 prompt that ...
0
votes
1answer
54 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?
2
votes
1answer
43 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
58 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 ...
0
votes
1answer
70 views

How convert decimal to Hexadecimal in Ubuntu?

I am using a bash file in Ubuntu and i wrote an executable code in this file that must use some Hexadecimal number. But I just have decimal numbers so I want to convert decimal numbers to Hexadecimal ...
0
votes
2answers
131 views

How to run a script on ssh login and run another script after the first terminates?

I'm trying to run a script/shell just after I login via ssh to my host with a "guestUser" the mission of this user is to connect to another remote host via ssh, I've created this user on my host: ...
1
vote
1answer
374 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 ...
1
vote
1answer
135 views

Can't run /bin/bash… sometimes?

I’m on a Google Compute Engine which is running Debian Wheezy 7.4. I’ve been noticing strange things recently. For example, I can do sudo bash. But then, from root, I can’t do sudo -u anotherUser ...
0
votes
1answer
230 views

Mac alias for npm install && bower install

How can I assign this alias to my new mac with Yosemite? alias in = "npm install && bower install"
0
votes
0answers
27 views

Changing Git Location on Mac OS X

I have a version of Git (1.9.3) already installed on my computer at /usr/bin. This version was installed (if I remember correctly) by XCode. I would like to install 2.2.1 (the download version from ...
8
votes
1answer
5k views

iTerm/zsh not reading .bashrc OR .bash_profile

In ~/.bash_profile I have : if [ -f ~/.bashrc ]; then source ~/.bashrc fi In ~/.bashrc I have some aliases When I load a new iTerm window, my aliases do not work. If I source ~/.bashrc they ...
0
votes
0answers
126 views

SSH .bashrc Alias for `Clear` Command Twice

Sometimes it is helpful to call clear twice to add some padding so that scrolling up or down will allow us to look at the output of previous commands easier, e.g. I can segregate compiler output by ...
1
vote
2answers
62 views

How to let the .bashrc know the current operation system

I have several linux computers sharing one disk and one home folder. That is on the disk, there is the home folder: \home\wuciawe And for computer A, whose os is Centos, it will load ...
0
votes
1answer
72 views

Sourcing ~/.bashrc in ~/.profile?

I'm quite new to developing under OSX and assigned some aliases and other preferences in the ~/.profile initially, however it got quite big and messy after a while because I had a lot of Environment ...
0
votes
0answers
87 views

Close terminal if exit code is not 0 for command after login

For security, I'm trying to set up double authentication for a CentOS server. The way it works is you log into a user with SSH keys then once you log in it executes su to change to the root user, ...
0
votes
2answers
40 views

'hhighlighter' wrapper script saying command not found [closed]

I have gotten the wrapper script 'hhighlighter' from https://github.com/paoloantinori/hhighlighter which colors anything you want in stdout. I followed the instructions about installing ack-grep, ...
0
votes
2answers
384 views

Can’t write to .bashrc: permission denied

I have downloaded NDK for my Eclipse Juno. Now I have to add the NDK to path and have to add the following lines to my .bashrc: export ANDROID_NDK=/_path_to/android-ndk-linux/ export ...
2
votes
2answers
1k views

what is `ssh-agent bin/bash` and why I have to `ssh-add` everytime

I have to run the following commands each time I restart: ssh-agent /bin/bash ssh-add ~/.ssh/key_rsa First question is why is /bin/bash necessary and what it is used for? Second, Is it ok I run ...
0
votes
1answer
50 views

KDE bash --norc

I would like to disable ./bashrc with the command bash --norc when opening a session on the KDE Destop enviroment. but I dont really understand where to place it, if on the startkde, Xsession or where ...
0
votes
5answers
136 views

History in bashrc on login vs manual sourcing - clearing and loading

I use a bunch of different aix machines at work and need to share users with co-workers. To make my life easier but not bother others with my customizations, I have created a .bashrc file that I copy ...
0
votes
1answer
44 views

in bash, how to load and execute an external bash script from a server, like github?

I'm thinking maybe I could have my ~/.bashrc (or other such customization bash file) live on my github and load it from whatever remote shell I log into with a command. Is that possible, and if so ...
2
votes
1answer
94 views

PATH preference in bashrc

I was wondering what happens in the following situation. Suppose I have an executable file in a directory that is in PATH in .bashrc. If I copy the file into another directory that is set in PATH ...
0
votes
0answers
63 views

Broken sudo commands

How to repair sudo to use standard commands? I cannot use any command with sudo.
0
votes
1answer
143 views

Bash doesn't source file unless manually started

bash won't source files from an login terminal unless I manually run bash from a terminal, I have bash (and not sh or dash). When I source a file, it returs errors (like "syntax error near unexpected ...
0
votes
1answer
78 views

.bashrc used in gnome not just terminal

I've recently started using the Anaconda Python distribution for software development and I want it to be the default Python distribution when I run something in the terminal. In order to do this, ...
0
votes
2answers
117 views

how to disable `alt-numkey` in bash shell

I can bounce between apps in Chrome OS by pressing alt-N, where N is the position of my app on the status bar. Useful! But when I'm in the bash shell of my Nitrous.io box, pressing alt-N to bounce to ...
1
vote
1answer
74 views

Echoing aliases to .bashrc

I want to echo an alias straight into my .bashrc file. Here is what I am using: echo alias cdear='cd | clear' >> .bashrc However, the new line in .bashrc does not contain the quote marks. I ...
1
vote
1answer
361 views

Color in bash prompt messes up git output

I changed my .bashrc to include export PS1="\033[1;33m\u@\h: \w>\033[0m" so that my shell prompt would be colored, but it seems the \033 messes up git output (log and diff, at least). I see ...
0
votes
1answer
118 views

alias can't find a file that actually exists

On my personnal computer, not a server, in my .bash_profile (I'm on OSX) — sym-linked to .bashrc, I have the following line among some others : alias deploy=sh ~/dir/ectory/deploy.sh The file ...
0
votes
1answer
4k views

How to run a tcl script in NS2 when path in bash file is not found?

i have added the path to where i have saved my tcl script (i.e. where ns2 is installed in home/me/ns-allinone-2.35). i have created a .bashrc and .bash_profile too, since they were not there. In ...
12
votes
3answers
1k views

What does . .bashrc actually do?

When I enter a eg. a new alias into my .bashrc file I can't use it in that terminal window immediately and until recently I thought I had to restart the terminal to reload the .bashrc file. Then I ...
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
2answers
65 views

modify ssh_config ip addresses based on current ip

I'd like to be able to modify ssh_config aliases based on my current IP address. I have a laptop which I carry around from network to network, and a camera which I do the same with. I have setup the ...