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

learn more… | top users | synonyms

5
votes
5answers
8k views

Where I can find the contents of the default /etc/bash.bashrc file?

I accidentally overwrote the /etc/bash.bashrc file. Please give me the default content in that file to restore, or the file itself.
0
votes
2answers
14 views

customized shell script can not be run

I have wrote a shell script, show the script myscript.sh #!/bin/bash ssh -t proxy@PROXY -p 22022 "ssh me@REMOATE_MACHINE -p 22022" And I put the script to /opt/scripts/myscript.sh, and chmod u+x ...
0
votes
1answer
36 views

Installation of Paraview 5 on Ubuntu 16.04: can't open Paraview due to libGL errors

I hope it's OK to cross-post; I have asked this question on StackExchange too. I'm trying to install the latest version of Paraview (version 5.1; http://www.paraview.org) on Ubuntu 16.04. After ...
0
votes
2answers
27 views

Run Executable After login [duplicate]

So I have an executable (output of gcc compiling a C program), that I would like to run after login so it is the first thing a user sees upon login. It is a graphical menu that displays system ...
0
votes
1answer
27 views

How to start a gnome-terminal without loading profile (like bash --noprofile --norc)

Can I start a gnome-terminal without loading profile? (just like bash --noprofile --norc) Sometime I made mistake in writing .bashrc and find no way (except ssh from another machine) to access that ....
3
votes
1answer
76 views

$: command not found error

on opening terminal it shows on top $: command not found $: command not found $: command not found yogesh@yogesh-WNB8PHF4710C-0030:~$ and my .bashrc file has # ~/.bashrc: executed by bash(1) for ...
32
votes
6answers
60k 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 ...
19
votes
5answers
2k views

How do I teach bash in Ubuntu some curse words?

When bash encounters an unknown command(word?) it does this : The program 'hello' can be found in the following packages: * hello * hello-debhelper Try: sudo apt-get install <selected package&...
44
votes
3answers
43k 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 ...
1
vote
1answer
52 views

Why can't I update .bashrc on Ubuntu 16.04?

My .bashrc file before updating is as below and my Hadoop worked as well: JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 HADOOP_INSTALL=/usr/local/hadoop PATH=$PATH:$HADOOP_INSTALL/bin PATH=$PATH:$...
19
votes
3answers
16k views

How do I restore .bashrc to its default?

I've been trying to install Android developer tools on Eclipse, and I followed the information in this video. Like the video said, I added the following two lines of code to the .bashrc file: export ...
1
vote
1answer
22 views

Bash reverse-i-search wrong prompt output

After modifying my .bashrc to add color to prompt, reverse-i-search output formatting is messed up. Typing CTRL+R to start a new search, prompt output is OK: After pressing right arrow to modify ...
0
votes
1answer
121 views

-bash: export: not a valid identifier

Whenever opening the terminal, I always end up with this same error. -bash: export: `/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/usr/...
2
votes
0answers
40 views

bash.bashrc damaged..ubuntu log in loop and no interactive programs working from terminal

I have accidentally deleted the content of /etc/bash.bashrc and now I cannot log in as it gives me a loop and I cannot run any interactive programs from the terminal. When I try, I get this error: ...
2
votes
1answer
110 views

Terminal closes immediately after opening. (After upgrade to Ubuntu 16.04 LTS)

I upgraded my ubuntu from 14.04 LTS to 16.04 LTS after that whenever I open gnome-terminal with Ctrl+Alt+T or xterm or uxterm it closes immediately. I tried all the solutions on Terminal immediately ...
0
votes
1answer
9k 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: ...
0
votes
1answer
55 views

The ~/.bashrc file is missing after reboot

In Ubuntu 14.04 each time I reboot, the bashrc file is missing in the ~/. location. What happened? Please give me some suggestions! Thanks! Update: Add new ~/.bashrc, then ls -l ~/.bashrc get the ...
0
votes
1answer
50 views

I'm getting this whenever I open terminal

How do I fix it :/ declare -x CLUTTER_IM_MODULE="xim" declare -x CMAKE_PREFIX_PATH="/home/ahmed/catkin_ws/devel:/opt/ros/indigo" declare -x COLORTERM="gnome-terminal" declare -x ...
1
vote
1answer
618 views

Error message when open terminal

This appears when I open the terminal: bash: export: `=': not valid name bash: export: `/home/(my account name)/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/...
0
votes
0answers
19 views

Does Ubuntu handle 'bash_profile' differently from OS X in subshells? [duplicate]

On my OS X system, when I use a subshell (for example with screen), the settings in my .bash_profile are inherited, but on Ubuntu, they are not, and in order to get the same behavior I have on OS X I ...
0
votes
1answer
36 views

Installing Ruby On Rails shows errors on line 168 [closed]

I am trying to install ruby on rails on my me elementary OS 0.3.2 Freya. and now i am seeing the following errors on my terminal. even if when i restart the terminal the errors shows on the first ...
3
votes
1answer
59 views

Avoid terminal characters from previous terminal commands

Well, I think you know pretty well what I'm talking about; if not, check this video. Basically, when you press your up array to obtain the previous command, often the characters are left on the ...
0
votes
3answers
4k views

Why I can't edit .bashrc file in Ubuntu?

When I do vim .bashrc and try to edit the file it gives following error. Can't open linked file for editing When I do ls -la it shows .bashrc -> /home/likewise-open/company/user/...
0
votes
1answer
90 views

How to automatically `sudo mount`?

I have a couple of shared directories on my NAS server that I want to automatically mount. Currently I have tried putting them in my .bashrc file but this means every time I open a terminal it will ...
5
votes
1answer
70 views

need help creating an if statment that will work for my purpose in .bashrc

I have edited my .bashrc to look like this with some help from others on this forum ... Thanks guys for the help on the weather segment of this script... An issue I have ran into is the code for the ...
32
votes
3answers
46k 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. ...
0
votes
3answers
151 views

How can I run a shell script from bashrc file?

What I basically want to achieve is to type in a custom command in the terminal and a specific shell script should run each time. I could achieve the above requirement with folders,by modifying the ...
5
votes
2answers
500 views

How to change colours in bash prompt

I have followed the instructions here and in the howto link that is provided there. However nowhere does it appear to say how I can change the colours of the different parts, because currently I set ...
22
votes
1answer
29k 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 ...
1
vote
1answer
506 views

Changing Background Image in Multiple Terminals

I was wondering if anyone would know how to change the background image in the terminal in a unique way. I know how to change it so that every instance of the terminal has the same background, but I ...
1
vote
3answers
2k 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 ...
50
votes
8answers
358k 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 (~/....
1
vote
1answer
26 views

What is the difference between --init-file and --rcfile?

I've been working with bash, and I came across the --rcfile and --init-file options. Bash's man page lists these under the same section, but they seem to behave differently. Take the following ...
0
votes
1answer
22 views

PATH variable in different terminal windows

I note that if I have several terminal windows opened and in one of them I set path variable through bashrc: export APP_PATH="path_to_app" export PATH="$APP_PATH:$PATH" Then call: source ~/....
0
votes
0answers
49 views

Change ls colors only in home directory not in mounted disk

I try change color of Dir in ls so i add this into my .bashrc: alias ls='ls --color=auto LS_COLORS=$LS_COLORS:'di=1;33:' export LS_COLORS and it works. But when i'm in my mounted disk it does not ...
1
vote
3answers
470 views

Merging Home Directories Breaks Readline/.bashrc

Over the last few days, I merged a home directory from a working install of 12.04 to an old home directory, I believe from an install of 10.04 (it was a bare driv) I got the new drive to load and ...
1
vote
3answers
6k views

nvcc not found, but only when using sudo

I can't get ANYTHING working on linux. I'm trying to compile CudaMiner. sudo make: ypt-jane.o `test -f 'scrypt-jane.cpp' || echo './'`scrypt-jane.cpp mv -f .deps/cudaminer-scrypt-jane.Tpo .deps/...
15
votes
4answers
24k 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 ...
0
votes
1answer
88 views

My permanent alias isn't working [duplicate]

Sorry I am new to ubuntu, just installed it. The version Ubuntu 14.04.4 LTS. I finally learned how to install a program called WebStorm and trying to create an alias for it. I tried creating it ...
1
vote
1answer
37 views

What files are ran when I log into the desktop?

I don't know how to phrase this to be clear. I'm not talking about terminals or shells, I know what the difference between login and non-login shells are. What I want to know is when I start up my ...
11
votes
2answers
28k 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, completion,...
4
votes
2answers
15k views

alias of nodejs as node on 14.04

i installed nodejs with apt-get on 14.04 When i do nodejs -v v0.10.25 and when i do node -v node : command not found. So i want to make alias of nodejs as node So i inserted a line in ~/....
0
votes
1answer
66 views

Help me understand .profile, .bashrc, etc [duplicate]

My current understanding is that commands added to these two files are run every time a new terminal is open. Is that correct? Because in a lot of places I see suggestions to put there commands I want ...
3
votes
2answers
1k views

gnome-terminal starts with “grep: write error: Broken pipe” message

I am running Ubuntu 14.04.3, it's uptodate. I don't know why, for a few days I began to take grep: write error: Broken pipe message on launching gnome-terminal . It seems to be harmless but it bothers ...
0
votes
0answers
56 views

Bash autocompletion

.bashrc is sourcing : . /usr/share/bash-completion/bash_completion which has _completion_loader() function for loading: /usr/share/bash-completion/completions folder but its not working in 15.10 ...
62
votes
4answers
63k 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 ...
3
votes
3answers
131 views

Can't use terminal any more after editing bashrc file

Last time when I added JAVA_HOME="/usr/lib/jvm/open-jdk" (java path could be different) source /etc/environment (and this too ) at the end of bashrc file. when i saved and exited, Terminal keeps ...
0
votes
0answers
12 views

Can I use a hexadecimal value rather than ANSI colors in gnome-terminal? [duplicate]

I would like to have specific colors for my PS1 prompt, but those colors do not match my theme. I would like to keep the theme consistent for vim and other programs; however, I would like to change ...
6
votes
4answers
8k 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. ...
0
votes
0answers
56 views

Spelling mistake in ~/.bashrc

I am a newbie and I wanted actually install MeanJS but then I made the following mistake. I wanted to paste this in the terminal: echo 'export PATH=$HOME/.node/bin:$PATH' >> ~/.bashrc But ...