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

0
votes
1answer
10 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
139 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
723 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
0answers
44 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
38 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 ...
0
votes
0answers
27 views

Sourcing local .bashrc .vimrc without copy to remote machine

does anyone have any idea or hack how to source my local dotfiles (I will probably need more of them so this solution should work with many files) on remote machines without scp them to remote ...
1
vote
2answers
70 views

How to insert bash scripts inside the PS1 variable

I made a custom PS1 variable, which is a tremendously confusing. Here is the one that is closest to being fully working: PS1="\n[\e[1;31m]\u@\H[\e[35m] \@ [\e[32m] PWD: \w [\e[1;34m]This folder ...
3
votes
3answers
213 views

Why do people source bash_profile from bashrc instead of the other way round?

It sounds like most terminal emulators don't run local sessions as login by default, so they'll load bashrc rather than bash_profile. So why do most people put everything in bash_profile and have ...
0
votes
1answer
27 views

Can I tell if I'm in an scp session in my .bashrc?

Inside my .bashrc, I'm doing a bunch of magic that causes problems when I'm trying to do an scp. The solution I've been going with is to manually ssh to the target machine, disable my .bashrc, do the ...
3
votes
3answers
62 views

Use different colors for every another grep

How can I configure grep that I could highlight in color smarter? By using different colors? Problem : "grep --color" default use red to highlight matches, but it still difficult to read for ...
0
votes
2answers
93 views

Run bash_aliases on start

I have a separate file .bash_aliases , in the same directory as .bashrc, that I wish to be ran on start, I've added the lines: if [ -f ~/.bash_aliases ]; then . ~/.bash_aliases fi to my .bashrc ...
0
votes
1answer
572 views

Linux Mint something wrong with my .bashrc

The path of my .basrc file is /home/vamsi/.bashrc It is weird that my file has nothing but the path I set. I think I am using a file at the wrong location or that I have lost my .bashrc file as ...
0
votes
0answers
47 views

Lack of /etc/debian_chroot

While logged as root I create new user on my machine with adduser ziel. After su ziel I can see: $ su ziel cat: /etc/debian_chroot: No such file or directory ($(cat ...
1
vote
2answers
149 views

xterm not wrapping text properly

I'm configuring both my gnome-terminal and xterm columns (i still haven't picked which of these I will be using) and I have a couple of issues I would like to fix: the typing area seems to be ...
1
vote
1answer
95 views

After updating bashrc in cygwin the cursor starts at column 0 instead of after the prompt

The issue is that, if I update PS1 in bashrc, I see that by default the cursor gets placed at column 0 instead of after the prompt, and if I type anything it starts overwriting the prompt. I tested ...
2
votes
1answer
173 views

Bash, how to globally fix ^H and ^? backspace problems

I'd like to fix this frequent problem where the shell on a remote server thinks my terminal's backspace key is ^? and sometimes it thinks it is ^H, and happens to be incorrect and outputs the wrong ...
3
votes
2answers
93 views

Source my bash profile when I su on OS X

I'd like to source my .bash_profile (or maybe some other file) whenever I switch to superuser. (.bash_profile is the login rc on Mac OS X, .bashrc is the non-login script, and .profile is a login rc ...
0
votes
2answers
69 views

Open list of files in the directory from which to choose the file to edit in vim

In the video at Watch how i work rails he first obtains the output of find . -type f and uses this list as a regular vim file to search. Ones he finds this file in the list, he can open it in vim. ...
0
votes
2answers
78 views

Use the result of 'whoami' as part of an alias

I am setting up my default .bashrc on my Ubuntu machine that I will soon be adding more and more users to. One command that users will have access to is mysql, logging them into the SQL system on the ...
0
votes
0answers
198 views

akka cluster cant read my config file

I am very new to akka and would like to use Akka-cluster to build a cluster composed of two kinds of nodes, one with the role "front-end" and another with the role "back-end. Both these nodes will ...
3
votes
2answers
113 views

Append dir to PATH

I'm trying to localy add a dir to the global $PATH variable. I added the following to my .bashrc. export PATH=$PATH:$VRS/bin But PATH seems to get concatenated to itself over & over every time ...
0
votes
1answer
232 views

Why I have a .bashrc.dpkg-dist file?

I just install Linux Mint Debian Edition, and in my home there is a .bashrc.dpkg-dist file instead of Ye old .bashrc Why? Can I move it to .bashrc?, Should I edit a new .bashrc file or the ...
1
vote
2answers
678 views

Spaces in Linux environmental variables?

Given directory: /media/foo/can haz/bar, I have tried editing bash.rc with: export Foo=/media/foo/can haz/bar export Foo=/media/foo/can\ haz/bar export Foo='/media/foo/can haz/bar' export ...
1
vote
1answer
1k 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" ]] ...
2
votes
1answer
76 views

Creating a .bashrc function with encapsulated commands

I'm trying to create a function in .bashrc to shortcut my MAMP commands. I want to do something like this: mamp config Opens up MAMP's httpd.conf file for editing. mamp restart Restarts the ...
3
votes
1answer
139 views

How to benchmark bashrc / zshrc and prompt rendering time?

As im currently experimenting with new stuff in my prompt i need a way to tell what the performance impact is. How can i monitor how long it takes to render my prompt and the time it takes to source ...
6
votes
2answers
5k 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?
2
votes
2answers
62 views

How can I make my configuration available regardless on which machine I am working on?

I have created a custom .vimrc and .bashrc in my local machine. Also I have a couple of vim plugins that I find useful. Now I ssh remote servers to work very frequently. But each time in order to work ...
2
votes
1answer
124 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 ...
2
votes
3answers
640 views

Where are aliases set in CentOS?

There is a typo which causes an error message upon logon (someone typed lias instead of alias). I have checked /etc/bashrc as well as ~/.bashrc and /etc/profile as well as ~/.bash_profile for ...
1
vote
1answer
181 views

Running source ~/.bashrc doesn't load the right version of node when using nvm

I have placed this at the bottom of my ~/.bashrc: # NVM . ~/nvm/nvm.sh nvm ls nvm use 0.8 nvm ls This is the output when I load a terminal: Last login: Mon Apr 29 16:28:17 on ttys010 v0.4.7 ...
0
votes
1answer
443 views

gVim does not source .bashrc, .bash_profile, or .profile from non-interactive non-login shell

I have the following on my .vimrc set shell=C:/cygwin/bin/bash set shellcmdflag=-c set shellxquote=\" So the shell I am using is non-interactive and non-login. I thought that non-login shells ...
4
votes
2answers
979 views

How to persist bash history?

I don't know if this is expected, but my history is not saved across sessions. This is to say, if I close the window, then when I open it again, the history is empty. How can I persist it across ...
0
votes
1answer
66 views

emacs gui from the terminal

I have in my ~/.bashrc an alias setup so emacs will open in the terminal. How can I open the gui without commenting out the alias, closing down the terminal, re-opening the terminal, and then doing ...
2
votes
1answer
80 views

how to clear the effect of system wide bashrc

At my company there are system-wide bashrc files like /etc/bashrc and so on. Inside, they source more and more files. It's very confusing (I noticed my "ls" is aliased with a bunch of flags to ls ...
0
votes
2answers
50 views

can you make your terminal so that it times all the commands except common ones?

Is it possible to configure your shell(bash) so that it times all the commands except the common ones(like ls or cd)? so when I type some command like command arg1 arg2 I would want my terminal to ...
2
votes
3answers
707 views

Source new .bashrc in all open terminals

I find myself having many terminals open at once all the time. When I update my .bashrc, I have to go to each terminal and execute . .bashrc to source the terminal with the new .bashrc. This is ...
1
vote
2answers
326 views

Function defined in my user's .bashrc causes an error when I sudo su

I have a function defined in my user's .bashrc file that displays my current git branch name at my command prompt: parse_git_branch() { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* ...
0
votes
1answer
83 views

linux - Play sound on login?

I've installed Gentoo without a GUI and have appended aplay /usr/shar/sounds/startup3.wav &> /dev/null & to my /etc/bash/bashrc file. This works just fine in playing the sound file, but ...
1
vote
2answers
146 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 ...
0
votes
1answer
346 views

csh -> bash, autostart .bashrc PCBSD (FREEBSD)

Hey Im stucked with this problem... Im using PCBSD (freebsd) which has default csh shell, now I wanted to use bash as a default so I made > chsh -s /bin/bash milo now i have in passwd > ...
1
vote
1answer
209 views

Alias defined in .bashrc not working after pipe

I'm stuck with the following problem. I've defined an alias in .bashrc (and .bash_profile): alias echo2="echo" This works well: $ echo2 "test" test However, if I try to use it after a redirect, ...
1
vote
1answer
117 views

Bash colorless on Plesk machine (debian)

Somehow from one day to the other, on my plesk server, the bash/terminal was colorless. A friend of mine managed to get it coming back to life (color, that is) by making some changes to the bash ...
1
vote
2answers
5k views

How do I boot a Raspberry Pi directly into browser?

I have put the following line in my /etc/bash.bashrc file: chromium--kiosk www.bbc.co.uk However I then get an error at start up: (chromium:2100): Gtk-WARNING **: cannot open display: If I set ...
0
votes
2answers
90 views

can't cd into directory with spaces

I have tried all the ways of getting into a directory with spaces, and they all do not work. mkdir "test folder" Attempt #1 cd "test folder" **bash: cd: test: No such file or directory** ...
2
votes
1answer
149 views

How to enable the bash history only caching commands that are acutally in path?

Having a bash history enabled is a security risk, because when you accientally enter your password into the bash the password gets stored in the bash history. To prevent this a good solution would be ...
2
votes
1answer
428 views

How do I change the default python version in Red Hat 6?

I've recently installed Enthought Python Distribution, after which it gave me the message: As the last step, you should edit your .bashrc or prepend the EPD install path: ...
1
vote
1answer
2k views

editing .bashrc file

I finished installing Enthought's python EPD free, I got this note: As the last step, you should edit your .bashrc or prepend the EPD_free install path: /home/zed/epdfree/bin Thank you for ...
1
vote
2answers
461 views

dmenu doesn't set environment variable as per my .bash_profile when running Emacs

I have following ~/.bash_profile [[ -f ~/.bashrc ]] && . ~/.bashrc and ~/.bashrc ### Check for shell interactivity. if [[ $- != *i* ]] ; then return fi ### Nyan-cat prompt. ...
0
votes
1answer
449 views

In linux, how can we change bash environment variables using initialize script?

We know that we can change bash's environment variables, for example PATH, using initialize script, for example .bashrc. Just writing PATH=<VALUE> and you will get what you want. But, consider ...