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

learn more… | top users | synonyms

3
votes
1answer
868 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/ ...
3
votes
1answer
35 views

Keeping “info” lines visible after quitting “info”?

I have: export MANPAGER="/usr/bin/less -r -X -is" as the last line in ~/.bashrc. This allows me to keep most of a man page visible on screen after exiting man. I want to do the same when I view ...
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 ...
3
votes
2answers
5k 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 ...
3
votes
1answer
207 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 ...
3
votes
1answer
87 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 ...
3
votes
2answers
2k views

Where to put custom .bashrc stuff, in .bash_local?

Just upgraded to 11.10, and prompted me to wondering where is now the preferred way to put customised .bashrc bits? I have some aliases, some env variables, and a python virtualenvwrapper script, for ...
3
votes
1answer
59 views

How to make the terminal autocomplete based on previously entered commands? [duplicate]

It's normal when using terminals that pressing up and down cycles through previous commands entered chronologically. I learned from a site how to add to that behaviour by autocompleting what I'm ...
3
votes
1answer
217 views

Why doesn't the xbacklight command work in rc.local?

When I execute the command xbacklight -set 10 in my terminal the brightness is set to 0.1 as it should. But when I use this command in my rc.local-file, then it is not executed upon start -- because ...
3
votes
1answer
340 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
2k 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 ...
3
votes
1answer
380 views

Is there a secure way to pass authentication parameters for proxy to applications?

I am behind a proxy server and need to specify authentication parameters to access the internet. For this, I have exported my username, password, host and port_no in my /home/$USER/.bashrc file and in ...
3
votes
1answer
349 views

Why default .bashrc is set to return immediately if not running interactively?

In Ubuntu default .bashrc there's this: # If not running interactively, don't do anything [ -z "$PS1" ] && return Does anyone know why that is there? Is there something in the bashrc that ...
3
votes
1answer
183 views

.bashrc not responding

I'm having an odd problem with the .bashrc file. I've added the following line so git could show me the current branch on prompt (I saw this tip here) #Show branch in status line PS1='[\W$(__git_ps1 ...
2
votes
5answers
16k views

How to modify “/etc/bash.bashrc”? It is read only?

Trying to modify /etc/bash.bashrc I get an error: $ echo "my edit" >> /etc/bash.bashrc bash: /etc/bash.bashrc: Permission denied ls -ll /etc/bash.bashrc shows: -rw-r--r-- 1 root root 1975 ...
2
votes
1answer
142 views

~ no longer takes me to my home directory

I'm a newcomer to Ubuntu (and linux in general) and since I have a machine spare, I have Ubuntu Server (terminal only) installed on one of my machines. I've recently started playing around with my ...
2
votes
2answers
127 views

How do I create an alias that displays the contents of a `history list`?

How do I create a new alias command called cet103demo which displays the contents of the bash history list one page at a time, and also making sure the new alias is automatically loaded when the ...
2
votes
3answers
330 views

What do I do if I want to execute ls command everytime I do a cd to any directory?

Most of the time when I do a cd command I also do a ls to see what other files or folder are in that directory. So I want to execute ls everytime I change the directory. I know I can do cd foo ...
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: ...
2
votes
1answer
3k views

What can cause my .profile file to not be loaded when a new terminal shell is initialized?

There are no errors in xsession and I don't have a .bash_login or .bash_profile file, so I'm 100% certain neither of those is loaded and thus cancels .profile loading. When I rename the .profile to ...
2
votes
3answers
3k views

I accidentally overwrite /etc/bash.bashrc file. Please give the default content

I accidentally overwrote the /etc/bash.bashrc file. Please give me the default content in that file to restore, or the file itself.
2
votes
1answer
6k views

Where is bashrc profile for root?

I believe the question says it all. Also if it doesn't exist where do I create it. Ubuntu 10.04
2
votes
2answers
71 views

Problem in creating alias, get strange messages

[Reviewers: note that the question was completely rewritten after the close votes.] I recently found how I can define aliases for bash in the ~/.bashrc. But since I tried that, I see the followig ...
2
votes
1answer
563 views

creating a bash alias name that contains an =

I am trying to set up a ~/.bash_aliases that worked in 12.04 but now bash complains about the = sign. alias emacs = 'emacsclient -c -a --socket-name=server --alternate-editor=' How can I set this ...
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
1answer
691 views

Change default binaries for texlive

Ubuntu ships with texlive 2009, which installs the tex binaries into /usr/bin/latex I've installed the current version of texlive with its installer, which installs its binaries into ...
2
votes
1answer
594 views

Is it possible to have .bashrc outside home directory?

I want to put a .bashrc file in a directory where my application is located, to set up path variables accordingly independent of the location of the directory at the moment. At the same time, I want ...
2
votes
2answers
114 views

installing a script in $PATH

I am trying to use yeoman in Ubuntu. Everything is installed correctly but I can't use the command yo from bash. If I navigate to the appropriate directory and run node cli.js everything works from ...
2
votes
1answer
73 views

Need to exec $SHELL on new terminal for settings to work

Unsure what is interfering with my shell, on every new shell I need to exec $SHELL to get correct settings to take. I am getting this prompt by default sayth@sayth-TravelMate-5740G:~$ and after ...
2
votes
2answers
2k 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 ...
2
votes
1answer
965 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, ...
2
votes
3answers
676 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 ...
2
votes
1answer
311 views

How to stop bash prompt colours from escaping

I'm trying to configure bash to display the current git branch, based off the example here, but I can't figure out how to get bash to stop escaping the colour strings. Everything I try results in the ...
2
votes
1answer
2k views

~/.bashrc changes have no effect?

I have been trying to set some custom colors on the user@hostname:~$ on the terminal. I edited both ~/.bashrc and /etc/bash.bashrc Where it said: debian_chroot:+($debian_chroot... I just changed ...
2
votes
1answer
2k views

How can I set HISTSIZE for all users?

How can I set HISTSIZE for all users on Ubuntu 10.04? I've tried adding the following lines to both /etc/profile and /etc/bash.bashrc. I'm not sure I understand the difference between the two files ...
2
votes
1answer
39 views

Customising terminal environment

I want to customise the command prompt. I've added: PS1='\[\e[1;30m\][\[\e[1;34m\]\u@\h \[\e[0;36m\]\A\[\e[1;30m\]]\[\e[1;37m\]~\W\[\e[0;37m\] \$ \e[0;100m' to ~/.bashrc. It is all good except ...
2
votes
2answers
75 views

Bash Function Oblivion [duplicate]

I'm fairly new to Linux, as many of you may have noticed. What I speak particularly is adding personal, user-generated functions and alias in my .bashrc file. I'm not exactly sure how bash works but ...
2
votes
2answers
3k views

~/.bashrc return can only 'return' from a function or sourced script

I am trying to setup a OpenStack box to have a look at OpenStack Object Storage (Swift). Looking through the web I found this link; http://swift.openstack.org/development_saio.html#loopback-section ...
2
votes
0answers
56 views

How to change my home directory?

I have a current /home/user/ directory for ~ but I want to change it to be at /user/home/ /user/home already exists. The option of using usermod is not going to work because I don't have access to ...
2
votes
1answer
144 views

bashrc shortcuts in Tmux

I have sets many shortcuts in .bashrc profile of local user, and they work properly. Currently on my 12.04 system but when ever I tried to used them in tmux, I always get the same response command not ...
2
votes
0answers
293 views

Virtualenv permission denied

After a lot of struggle with virtualenv/virtualenvwrapper I decided to remove all virtualenvs and re-install the packages. root> su myuser myuser> sudo pip install virtualenv myuser> sudo ...
2
votes
1answer
693 views

“Can't open” an /opt file

This is my first post. I wanted to ask for any idea so to solve my problem. I am using Ubuntu 12.04 LTS, and my purpose is to use OpenFoam CFD software. I am trying to execute an script called Allrun ...
1
vote
2answers
475 views

Why isn't one 'bash' command working at startup

I am working on a VM with Lubuntu 14.04, I have created a script a.sh, #!bin/bash echo "aaaa" >> a.txt And my /etc/rc.local file is as follows: #!/bin/sh -e # # rc.local # # This script is ...
1
vote
1answer
410 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 ...
1
vote
2answers
364 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
1answer
972 views

Executing a Super-user command through .bashrc

Is it possible to execute a super-user command in .bashrc? And if so, how? It would save me having to execute "sudo /opt/lampp/lampp start" on each startup. I've considered using the LAMP stack from ...
1
vote
3answers
2k views

Add a binary to my path

I have an executable. I want to execute the executable in terminal with name only like other commands. I can put my executable in /usr/local/bin or I could add its PATH to ~/.bashrc. Both will work. ...
1
vote
1answer
159 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 ...
1
vote
1answer
538 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 ...
1
vote
1answer
447 views

I can't run any command in Terminal

I tried to enter the command nano ~/.bashrc in order to include some path into the .bashrc file in home directory but I'm not able to run any command and I get always the following error: ...