.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
vote
1answer
12 views

Bash-Completion Does not work for Apt

I am running a minimal Debian installation that comes with practically nothing installed. I am trying to get bash auto-complete working. I have looked over all the questions on this subject in ...
0
votes
1answer
19 views

Not able to run fio bechmark as a root

I'm not able to run fio benchmark as a root user. Normal mode: Command 1: which fio Output 1: /usr/local/bin/fio Command 2: fio Output 2: No jobs(s) defined fio-2.12 fio [options] [job ...
0
votes
2answers
42 views

How do you re-source the environment variables in a command prompt in Windows?

In a bash shell, you can edit your environment variables, run source ./.bashrc and refresh the values of environment variables in an already open shell. Does Windows have a similar command that you ...
1
vote
1answer
49 views

How to execute command on urxvt startup

Urxvt doesn't support using an I bar as the cursor. One of the ways i've found to get around this is to send the command echo -n -e "\033[6 q". This works as long as I send the command every time I ...
0
votes
0answers
27 views

how to shorten git to g by using a alias

I am running git 2.7.2.windows.1 and I have edited my .bashrc file to have this line alias g='git' but when I type g status I get an error bash: g: command not found I even tried editing my ...
0
votes
1answer
20 views

Why are spaces not allowed while setting up aliases in .bashrc

Coming from the Windows world, I tend to type cls to clear the console. I wanted to set up an alias so cls would still work. I read an article online that mentioned you cannot have spaces between the ...
0
votes
1answer
17 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
19 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
14 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
52 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
326 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
77 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
650 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
37 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 != "screen"...
5
votes
1answer
113 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
75 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
86 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
2k 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
145 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
20 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
263 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
332 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
60 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
44 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
59 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
80 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
144 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
502 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 bourne-...
1
vote
1answer
146 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
247 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
29 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
6k 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
144 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
66 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 \home\wuciawe\....
0
votes
1answer
76 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
89 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
42 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
425 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 ANDROID_SDK=/...
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
62 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
145 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 how?...
2
votes
1answer
101 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 also,...
0
votes
0answers
65 views

Broken sudo commands

How to repair sudo to use standard commands? I cannot use any command with sudo.
0
votes
1answer
153 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
82 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, I'...
1
vote
2answers
144 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
82 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
408 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 ...