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

learn more… | top users | synonyms

-4
votes
1answer
31 views

Facing Problem in installing Matlab2012a [closed]

How to open .bashrc in a basic text editor to edit it.
0
votes
0answers
267 views

.bashrc is changed but there are no changes in the system

Bashrc file: alias edit_bash='gedit ~/.bashrc' export PS1="\u:\w:$ " After rebooting the command edit_bash doesn't work (not found) and the greeting is still the same as it was before. What's up ...
1
vote
1answer
407 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
379 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
158 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
450 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

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
507 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
930 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
83 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 ...
0
votes
2answers
267 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
102 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
768 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
67 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
325 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
675 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
129 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
311 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
223 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
4k 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
709 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
860 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
438 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 ...
10
votes
1answer
8k 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
454 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
226 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
361 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
188 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
133 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
4k 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
512 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 ...
3
votes
2answers
534 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
720 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
266 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
409 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: ...
7
votes
3answers
7k views

How to restore .bashrc

Terminal shows this 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 tried to fix it using ...
4
votes
1answer
569 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
606 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 ...