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

learn more… | top users | synonyms

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?
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 ...
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 ...
36
votes
3answers
16k views

Bash history search, partial + up-arrow

I have searched, but not found anything on this. I am looking for a functionality in bash, using a terminal. Way back when, I had a user on a debian system, and a friend set me up with a convenient ...
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 ...
6
votes
1answer
366 views

Sequence of scripts sourced upon login

I would like to concentrate all my login config in my ~/.bash_profile. There was a ~/.bashrc there by default but I replaced it with a ~/.bash_profile. However, when I log in, something before my ...
1
vote
3answers
1k 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. ...
11
votes
1answer
10k 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 ...
15
votes
4answers
1k views

How (and where) can one change 'user@host $:' pattern in gnome-terminal?

When I start terminal in Ubuntu, I see: ilya@HOST:~$ I need to add a timestamp to this, something like: 2011-10-09T09:32:00 ilya@HOST:~$ How can I configure this?
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.
4
votes
1answer
2k views

Restore .bashrc to its default?

I've been trying to install Android developer tools on Eclipse, and I followed the information in this video: http://www.youtube.com/watch?v=-qk9c-Ug2UI&list=PLQOohAn5nxx43fqFugU6dIwSQNbvXdgi5 . ...
0
votes
1answer
115 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." ...
12
votes
1answer
1k views

How to display random jokes from www.icndb.com in your terminal?

I already know that you can get some nice quotes/jokes using the fortune program. But I've found in this urwird script a new source of fun that I'd like to have when I open a new terminal. This time ...
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 ...
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 ...
16
votes
3answers
3k views

What does “${debian_chroot:+($debian_chroot)}” do in my terminal prompt?

In my terminal prompt definition in my .bashrc file, among other things, I have this snippet of code: ${debian_chroot:+($debian_chroot)} What does this do, and do I need it?
4
votes
2answers
780 views

Store frequently used terminal commands in a file

Okay, so I want add a command to my Desktop (Or any convenient location), and whenever I run it I want it to clone the HTML5 boilerplate. $ git clone git://github.com/paulirish/html5-boilerplate.git ...
3
votes
1answer
245 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 ...
9
votes
2answers
1k views

What does the first '.' mean in '. ~/.bashrc'? [duplicate]

I saw a post about fix your alias in .bashrc. And he says after you put your alias in .bashrc , you need to use: . ~/.bashrc I do not quite understand what the first dot(' . ') does here. What's ...
4
votes
1answer
4k views

What could be a reason for `.bash_profile` and `.bashrc` not to execute the exports?

the CUDA installation tutorial tells me to add the following two lines to my .bash_profile. export PATH=/usr/local/cuda/bin:$PATH export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH But ...
0
votes
1answer
1k views

Setting gnome-terminal window size from within ~/.bashrc

It know that it is possible to pass the --geometry=WxH arguments when using launcher, but how to set this option with the ~/.bashrc 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 ...
8
votes
4answers
12k views

Can not successfully source .bashrc from a shell script

Normally we can source ~/.bashrc file using this command source ~/.bashrc but if I write this in a shell script and execute it, nothing happen. Why? Is there any way to do this? my shell code: ...
4
votes
2answers
739 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
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 ...
1
vote
2answers
578 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 ...
6
votes
2answers
101 views

What is a .bashrc file and what does it do?

I can't seem to find any clear information on what the .bashrc file is and what it does exactly. Thanks for all the help so far. It seems that this script does everything from coloring, ...
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: ...
0
votes
2answers
188 views

how do I enable ccache

I am completely noob at this, i don't know what the make file is, and I don't know what bashrc is. but i do know where to download source code and use source somebash.sh then make file (as was told ...
0
votes
1answer
415 views

bash: /home/gaja/.bashrc: line 4: syntax error near unexpected token `('

When I open the Terminal I got the following the errors. bash: /home/gaja/.bashrccu: No such file or directory bash: /home/gaja/.bashrc: line 4: syntax error near unexpected token (' bash: ...
0
votes
1answer
431 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
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: ...