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

learn more… | top users | synonyms

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 ...
1
vote
2answers
242 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
394 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
204 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
651 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 ...
4
votes
2answers
740 views

How to check which terminal emulator is being currently used?

I have gnome-terminal and Guake installed. I want to give different startup messages to be displayed on these terminal emulators as they start. What code should I write in .bashrc so that this is ...
2
votes
1answer
2k 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 ...
1
vote
2answers
772 views

dircolors/ls not being displayed correctly under NTFS drive

I've been messing around with the colours of the files under the .dircolor file, and it worked perfectly under the Linux folders. But whenever I try to ls to a NTFS folder all files are displayed ...
4
votes
1answer
275 views

why aren't my bash aliases applied when logging in to server

When I log in to my Ubuntu 12.04 LTS server my bash aliases aren't applied, but if I execute bash from the command line they are. ~/.profile executes ~/.bashrc: if [ "$BASH" ]; then if [ -f ...
1
vote
1answer
436 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: ...
8
votes
3answers
9k views

How to restore .bashrc file?

The terminal shows this when it opens: bash: /home/atlas/.bashrc: line 73: syntax error near unexpected token `[' bash: /home/atlas/.bashrc: line 73: `if [ -x /usr/bin/dircolors ] ; then ' I've ...
4
votes
1answer
610 views

changes to /etc/bash.bashrc not permanent

After a recent upgrade to 12.04, auto tab completion was disable in /etc/bash.bashrc. I uncommented the following lines: if [ -f /etc/bash_completion ] && ! shopt -oq posix; then . ...
0
votes
2answers
673 views

Screwed up terminal after modifying bashrc

I ended up screwing up my terminal, while setting up Sbt for the Coursera Scala course. I can't summon gedit (or anything else) anymore. I got the following error: Command 'gedit' is available in ...
0
votes
2answers
1k views

adding executable file to path and launching from terminal directly

i just downloaded sublime text for my ubuntu, and its working fine. i have the executable file in my ~/sublime folder. now i would like to invoke this app from the terminal by just typing ...
5
votes
1answer
305 views

My bash function runs only once per terminal opened

When I try to run my bash function, defined in .bashrc, for a second time in the same terminal, it doesn't work. The code is the following: function nos (){ local option while getopts cs ...
0
votes
2answers
882 views

Running gedit in background

So I've got this working in a 10.04 ubuntu OS in bash where I can run: $ gedit app/file.rb bash opens that file with gedit but it is tied up. How can I make my earlier command equivalent to $ ...
1
vote
1answer
2k views

How do I source a shell script for Node Version Manager?

Hi and thanks for looking! I am new to Linux/Ubuntu, but I have set up an Ubuntu box on which to run Node.js. I have had moderate success, but now I need to be able to easily upgrade my version of ...
3
votes
1answer
179 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 ...
1
vote
3answers
2k views

PATH variable resets with reboot

Just as the title indicates my PATH variable resets after every reboot. I read that I have to edit my bashrc file's PATH variable, but I don't have anything there that suggests anything related to the ...
2
votes
1answer
308 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
3answers
325 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 ...
12
votes
2answers
18k views

.bashrc not executed when opening new terminal

The code in .bashrc does not execute when I open a new terminal window in Ubuntu 12.04. I noticed this when creating a .bash_aliases file. The aliases did not show up when I opened a new terminal. ...
1
vote
2answers
3k views

Gnome terminal is not running source .bashrc?

I have a clean installation of Ubuntu 12 and I installed bashmarks, a utility to have favorites folders on the terminal. One of the steps is to include source ~/.local/bin/bashmarks.sh at the end of ...
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 ...
11
votes
4answers
24k views

Specify JDK for tomcat7

I have installed tomcat7 (using apt-get install) and whenever I want to start tomcat7 it says : * no JDK found - please set JAVA_HOME I have set JAVA_HOME in my bash.bashrc and also in ~/.bashrc ...
11
votes
6answers
13k views

How to add an alias to a command in terminal?

By typing a manually specified command in terminal i want to do some. How could add an alias to a command? Can i do that with the help of the terminal or should i edit some kind of file?
10
votes
5answers
12k views

difference between bash.bashrc and /etc/environment file

Till data I was used to set my environment variables in the bash.bashrc file. Recently I told to use the /etc/environment file. Well, both work fine. So, what is the difference between them? I ...
0
votes
1answer
959 views

pactl module-loopback loaded every time computer is turned on

The pactl module module-loopback is loaded every time I turn on my computer. I'm not sure why, but I always have to use pactl unload-module 20 (for some reason the module is always id 20). Is there ...
24
votes
3answers
17k views

How can I shorten my command line (bash) prompt?

Currently it is: michael@Castle2012-Ubuntu-laptop01:~/Dropnot/webs/rails_v3/linker/spec/controllers$ Outside of renaming my machine and directory structure... How could I make it be something ...
4
votes
5answers
981 views

How can I uniqely record every new command I use, and possibly timestamp it?

I've been on Linux for more than 6 months now but never went too much into the CLI (command-line interface or terminal or shell) Now as I ask questions here, get answers, or help from other sites, I ...
5
votes
1answer
493 views

Synchronize profiles across servers (.vimrc and .bashrc)

I'm on a few different servers on any given day. I'm starting to really tweak two files in my bash profile: .vimrc and alias.sh. Would anyone have a recommended way to save and sync these two files. ...
12
votes
2answers
14k views

Configure gnome-terminal to start bash as a login shell, doesn't read .bashrc

I'm trying to integrate RVM with gnome-terminal. Per default, gnome-terminal does not start bash as a login shell. I enabled run command as a login shell as suggested in this answer about the same ...
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 ...
1
vote
0answers
757 views

what to do about .ssh-agent pop up at login screen? [closed]

I was setting up git with a ssh key passphrase on Ubuntu 12.04 via the terminal with the assistance of Help.GitHub: "You can run ssh-agent automatically when you open bash by adding the following to ...
28
votes
6answers
160k views

Where is .bashrc?

I feel stupid asking, but I can't seem to find the answer to this anywhere. I'm trying to follow these instructions to edit my bash prompt, but there is no .bashrc in either my user directory ...
16
votes
3answers
10k views

Changing colors for user, host, directory information in terminal command prompt

Is it possible to change the colors in the command prompt for the user@computer, as well as the the current directory and command parts of the prompt display? I've already seen something like this ...
51
votes
4answers
67k views

Why ~/.bash_profile is not getting sourced when opening a terminal?

Problem I have an Ubuntu 11.04 Virtual Machine and I wanted to set up my Java development environment. I did as follows sudo apt-get install openjdk-6-jdk Added the following entries to ...
2
votes
1answer
682 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
585 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 ...
1
vote
1answer
421 views

Error message when open terminal

This appears when I open the terminal: bash: export: `=': not valid name bash: export: `/home/(my account ...
7
votes
2answers
9k views

Root's .bashrc not executing on sudo -i

On one of my Ubuntu 11.10 servers, when I use sudo -i to become the root user, root's .bashrc is not being executed. On all other servers, whose relevant configurations are identical as far as I know, ...
0
votes
1answer
109 views

Crontab file is garbled! HELP!

I accidentally deleted my .bashrc file in Ubuntu 11.10. I think I restored it but I have two major issues now: Everything that I type has a red squiggly line under it in this field and the ...
12
votes
2answers
1k views

Can I create a separate bash history file for each terminal profile?

I use a bash script to start gnome-terminal with multiple tabs, each tab using a different profile, working directory, and in some cases executing a command within the tab. In this situation, I'd ...
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 ...
0
votes
1answer
255 views

Line gets overwritten instead of continuing on same line

I have a problem with the bash prompt. When I type a command that exceeds the length of the width of the screen it continues on the same line and overwrites what I have written, and then continues on ...