.bashrc is the Bash shell configuration file for a user's terminal login session.

learn more… | top users | synonyms

3
votes
1answer
698 views

Bash aliases - how do I run a file in a different folder without losing my current location?

I have a nice little bash alias in my .bashrc folder that allows me to start Tomcat running without having to cd into the folder first, e.g. alias startTomcat="cd ~/apache-tomcat-7.0.34/bin/ ...
0
votes
1answer
444 views

I have to reload bashrc each time

Despite the fact that I added some commands in .bashrc, I have to say "source ~/.bashrc" each time after rebooting. .bashrc PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting export ...
1
vote
0answers
848 views

Ubuntu got no .bash_login, .bash_profile

I'm new to Ubuntu and currently on it for assignment I need to run source ~/.bashrc at the first start of Ubuntu to enably my alias at the starting of the program. I've checked that I need to ...
3
votes
2answers
1k views

Install Elixir to System

How can I install Elixir on Ubuntu 13.04 so that I can easily use it from the command line and update it easily by cloning git. I have installed Erlang 16 by getting package from here Erlang ...
1
vote
1answer
482 views

Creating new user, inconsistent bash prompt

I've created a new user profile with: useradd kitty passwd kitty mkdir kitty chmod 0700 kitty chown -R kitty:kitty adduser kitty sudo #when I did it I initially didn't ...
0
votes
1answer
2k views

why is source command not being run in .bashrc

I have a source command which i have to manually run every time I open a new terminal. source /opt/ros/groovy/setup.bash Thus I added the command into the .bashrc file. However the does not seem to ...
1
vote
1answer
153 views

How to have the console echo (confirm) some commands?

I have Ubuntu installed on several machines, and I'd like to replicate the behavior of the console I found on one of them in all my installs (they're all 12.04, 64 and 32 bits). I installed Ubuntu ...
0
votes
1answer
110 views

Display part of fortune in different color

I created a custom fortune file for my favourite tweets in the format tweet and then the @username in a new line. An Example is: "You've changed." "Yeah I know, I'm a Transformer." ...
1
vote
1answer
2k views

Commands not working after editing .bashrc file

I need to install a programming software called cuda for my academic purpose. Googling how to install it on my Ubuntu 10.04, I found these and I have done that. download the software cd ~/Downloads ...
5
votes
3answers
2k views

gnome-terminal does not allow changing the title

I've selected "Replace initial title" setting in gnome-terminal's preferences, but it just shows the default title "Terminal". After reading this answer, I added this to my .bashrc: ...
-4
votes
1answer
31 views

Facing Problem in installing Matlab2012a [closed]

How to open .bashrc in a basic text editor to edit it.
1
vote
1answer
448 views

Why this .pam_environment setting prevents me from logging in? [duplicate]

I'm trying to move things from my .bashrc to .pam_enviroment because of this. I've put the following into my .pam_environment but this prevents me from logging in because there should be some mistake. ...
0
votes
1answer
410 views

Why Ubuntu doesn't load settings from my .bashrc/.profile for apps not started from bash? [duplicate]

At other and previous distros it was common for me to have the environment setup in .bashrc/.profile applied globally, whether I started applications from bash or not (IIRC). Now when I start ...
0
votes
1answer
178 views

Setting up rbenv properly

I have rvemv installed but every time I close terminal I'm required to execute exec $SHELL for it to reload rvemv otherwise I get an error that rbemv is not installed. How can I fix this so I don't ...
1
vote
2answers
513 views

Problem in .bashrc

I try to edit .bashrc to view the C-compilers that I installed before. But after opening the new terminal I am stuck with strange error. I am unable to ls the files/directories and nothing works. It ...
0
votes
1answer
3k views

How to reset .bashrc file which edited before to set PATH ANDROID sdk? [duplicate]

bash: export: `/home/entw/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local /bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/bin': not a valid identifier bash: /home/entw/.bashrc: line 111: ...
13
votes
4answers
560 views

How to get shared bashed history among different tabs

I used the answer in http://unix.stackexchange.com/a/1292/41729 to enable real-time shared history among separate bash terminals. As explained in the answer above, this is achieved by adding: # avoid ...
10
votes
1answer
1k views

How do I show a message with username and date at login?

How to show the message "hello $username, today's date is $date" as soon as you login to Ubuntu.
1
vote
2answers
1k views

How to set default environment variables for other users?

I installed postgres under Lubuntu 13.04. When I try to run it: sudo -u postgres psql it gives me this error: psql: could not connect to server: No such file or directory Is the server running ...
3
votes
1answer
84 views

Help Understanding Line in .bashrc

I've tried looking everywhere to determine what this line does in my .bashrc. The reason I want to know is because now ~/.pam_environment is recommended. This is the line: [[ -s ...
1
vote
2answers
301 views

How to get original system command after overwriting it with a function?

I'm at a Hackathon right now so if someone would answer this soon, you'd be doing me a huge favor. I've written a function called ls() in my .bashrc that looks like this: ls() { if(some ...
1
vote
0answers
116 views

How do I automatically rename the byobu window

Is there a way to automatically name my byobu windows. I think about an entry in my .bashrc or something similar that sets my tab name to $USER@$HOST.
3
votes
2answers
4k views

Changing behavior of bash prompt when functioning as root

Before you click away, this isn't the typical "how do I make my bash prompt have color" question. I've already customized my bash prompt to look like this: [user @ host]----[$(pwd)] $ where ...
0
votes
1answer
854 views

source .bashrc does nothing

after installing virtualenvwrapper I edited .bash_profile and added those lines (it was blank actually) export WORKON_HOME="$HOME/.virtualenvs" source /usr/local/bin/virtualenvwrapper.sh then I ...
1
vote
1answer
70 views

user recognizes command but root doesn't

I installed arm-linux-g++ and added its directory to PATH and it recognizes the command. But when I try it with sudo it says command not found. I even tried adding its directory to bashrc--root but ...
0
votes
1answer
400 views

Add a “named” path to .bashrc

I have an error of [error] Android SDK not found. You might need to set ANDROID_SDK_HOME or ANDROID_SDK_ROOT or ANDROID_HOME I have Android SDK installed and, obviously, I have to add a line in ...
0
votes
1answer
2k views

Bash alias not found stuck on my terminal

I was trying to make my Ubuntu connect to nexus tab and used the following command lines: echo "alias android-connect=\"mtpfs -o allow_other /media/GalaxyNexus\"" >> ~/.bashrc echo "alias ...
0
votes
1answer
765 views

Why is rc.local in /etc, should it be owned by root, and when is it run?

My understanding of rc.local, based on a quick Google search, is that I can put some bash in it which will be run at the beginning of [something] (what, user login, system start up?). The rc.local in ...
1
vote
1answer
134 views

Bash is printing (only) one of my aliases before every prompt

I think this is the relevant bit of my ~/.bashrc file: # enable color support of ls and also add handy aliases if [ -x /usr/bin/dircolors ]; then test -r ~/.dircolors && eval "$(dircolors ...
3
votes
1answer
324 views

How can I set a different .bashrc PS1 depending on the directory I'm in?

I have the git-prompt.sh script setup in my .bashrc file which gives me the useful git information in my prompt. This is great for small repos, but when I cd into a large repo, it can take a 30+ ...
3
votes
1answer
238 views

Saw an interesting command but can't alias it

Saw an command from this post http://askubuntu.com/a/266839/75967 that I would like to alias find {,/usr}/{,s}bin -printf '%f\0' | xargs -0 whatis | sort | less I assume the less or the | is ...
1
vote
1answer
2k views

There was an error creating the child process for this terminal

I am using Ubuntu since the version 10.04 and found it more friendly as compared to Windows. Right now I am using ' Precise 12.04`. I have created many custom launchers for bash scripts, and never ...
4
votes
3answers
2k views

How can I shorten the bash prompt's current path to one letter per directory?

I can't remember where, but I've already seen the bash prompt's current path shortened in an interesting way: every directory contained in the path is replaced by its first letter only. For instance: ...
4
votes
2answers
5k views

How to save terminal history manually?

It's my understanding that the history file is updated when the terminal exits. But sometimes my computer crashes out, and the terminal doesn't exit cleanly, and then I lose those commands from my ...
0
votes
2answers
900 views

~/.bashrc not autosourced in 12.04 lts

As this post says, the ~/.bashrc is sourced automatically in Ubuntu 12.04 LTS Server, which I use. I don't know where he got this information from, but as it is not downvoted yet, I believe it is ...
2
votes
1answer
913 views

bash history not being preserved

this is a fresh install of ubuntu 12.10. i haven't even looked at the bashrc or profile files when i noticed that history would work fine for the current session. as soon as i closed the terminal, ...
1
vote
1answer
481 views

removing a defined variable from .bashrc

Previously I defined a variable in my .bashrc file. Now I comment it and source the file again. However the echo command still returns the previous value. 1) $ echo $DB_ROOT /home/mahmood/db-4.0 ...
11
votes
1answer
9k views

Why is /etc/profile not invoked for non-login shells?

Login and non-login shell defined as: su - $USER # will give you a login shell bash # will give you a non-login shell /etc/profile is not invoked for non-login shells, such as when you start ...
0
votes
1answer
479 views

What is the best way to add some configuration to bashrc?

I'm currently trying to configure a server using Precise Pangolin and Vagrant (a software allowing me to provision a number of software when booting my VM). My current question is a pure bash one. ...
0
votes
1answer
1k views

Ubuntu root .bashrc file

I was installing rvm and for some reasons i changed first line on root's .bashrc what was there? i inserter if [[ -n "$PS1" ]]; then and see that i'm root, can't undo... What string is first like ...
3
votes
1answer
1k views

PATH not working even after successfully modifying it

For some reason I am successful in adding new directories to my $PATH but when I run the commands in the terminal the $PATH doesn't summon them. I modified the $PATH in the ~/.bashrc file, and added ...
1
vote
2answers
237 views

how to reverse the lower case characters in word using only sed

Reverse every word of a line using sed Description ----------- The job to do is reversing every word of a line. that a word is a sequence of lowercase alphabets Raw Input ...
1
vote
0answers
53 views

.bashrc not run when SSH-ing in as a user who has home dir encryption [duplicate]

If I SSH into an Ubuntu 12.04.1 LTS server as a user with home dir encryption, I get a really plain shell (no default .bashrc run). If I log in via console (of course causing the home directory to be ...
1
vote
1answer
378 views

Terminal auto-closes with “command not found” error

I followed this guide in omg ubuntu. I've just replaced the "GalaxyNexus" with "AsusInfinity". Now terminal won't open printing this: And closing after that... What did the last 3 commands do ...
2
votes
2answers
4k views

Run command in new gnome-terminal and .bashrc

I'm trying to launch one command in a new gnome-terminal window from a shell script, and it seems that my .bashrc file doesn't get sourced when calling gnome-terminal and executing a command: ...
3
votes
1answer
197 views

Aliases - able to pass arguments?

I want to make an alias in my .bashrc or .bashrc_aliases file (probably the latter). Specifically, I want to call the clang command for my *.c file I'm writing. What I'm looking for is best summed up ...
0
votes
3answers
2k views

Want to execute sudo command on shell startup

I've put a command sudo do something in my ~/.bashrc, this works but everytime I open the terminal I have to type in my password. How do I make it so there is no password-typing?
0
votes
0answers
134 views

/etc/bash.bashrc executed but not ~/.bashrc [duplicate]

The bash man page says: "When an interactive shell that is not a login shell is started, bash reads and executes commands from /etc/bash.bashrc and ~/.bashrc, " I can see that bash.bashrc is executed ...
2
votes
1answer
5k views

Add environment variable to .bashrc through script

I need to add the following lines to the end of .bashrc file in Ubuntu. How can I add these lines automatically using a script. If I run the script, then it automatically inserts the lines at the end ...
2
votes
3answers
591 views

gsutil bashrc file path setting

Actually I have just installed gsutil by following the instructions here. But now when I am typing gsutil at command prompt I am getting following: No command was given. Choose one of -b, -d, -e, or ...