The Bashrc file is used by the Bourne Again Shell in Unix/Linux to set environment variables and run commands. It is most often run when logging into a command-line shell or running 'su' to switch to another user.

learn more… | top users | synonyms (1)

0
votes
1answer
44 views

Where is this bash shell alias being configured?

While logged in as root onto a CentOS 6.5 system, I run ># alias alias cp='cp -i' alias l.='ls -d .* --color=auto' alias ll='ls -l --color=auto' alias ls='ls --color=auto' alias mv='mv -i' alias ...
0
votes
1answer
35 views

Modify the command line that gets saved to history / .bash_history in Linux

When commands are saved to history in Linux, is there some way to prepend the command line in the history with the remote SSH IP address and process ID so that it's easy to group commands from the ...
3
votes
0answers
86 views

CentOS colors in php-cli applications [closed]

I'm managing a server with CentOS 6.5 x64 installed. In my Ubuntu server, when I run composer or Laravel's artisan php cli command, parameters are colorful. But this doesn't happen when I SSH into ...
1
vote
3answers
262 views

How do I restore the default bashrc?

I have accidentally overwritten .bashrc. I did the following echo 'export EDITOR=/usr/bin/nano' >> /etc/bashrc Bur I accidentally typed > instead of >>. I guess, it was a bad idea. I ...
1
vote
0answers
83 views

EC2 - editing .bashrc causes terminal to hang and checks to fail

I've been testing this for the past few hours with no luck. When launching an Ubuntu 12.04 EC2 micro instance, I SSH to it, create a new user and continue with installing Ruby version manger under ...
-1
votes
1answer
34 views

Changing path to basedir of mysql

When-ever I need to start mysql from command line, I need to cd to the base directory and then use mysql command as shown below: # cd /home/ec2-user/percona-5.5.30-tokudb-7.0.1-fedora-x86_64/ # ...
1
vote
1answer
97 views

Change PS1 value for all Bash users

I am trying to change the prompt value for all users of a system (the $PS1 variable) to the same value. I have the following stored in file /etc/ps1: PS1='` if [ $? -eq 0 ]; then echo -n ...
0
votes
2answers
253 views

ssh SendEnv from windows to linux server using cygwin

I am doing ssh to a Open SUSE linux server from windows cygwin. I am trying to send one of my local environment variable through the ssh command so that I can load some specific .bashrc file right ...
0
votes
1answer
40 views

Red Hat 5.4 - Add time to bashrc

I am trying to add the current time to my bash in Redhat. I'd like it to read: [user@hostname 01:01:01 ~] and obviously be relative to when the bash prompt was placed there. Any ideas if this is ...
3
votes
1answer
705 views

Standard place for user defined bash_completion.d scripts?

I have user access (no root) into a Linux (Suse) machine where I developed some bash scripts and the corresponding bash autocompletion rules. Since the scripts belong only to my user and therefore I ...
0
votes
2answers
702 views

.bashrc not loaded, .bash_profile exists

In a ubuntu terminal my .bashrc isn't available until I run: source ~/.bashrc I have a ~/.bash_profile with contents: [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # ...
2
votes
3answers
229 views

Added line to bashrc, now bash is not responding

I added the following line to the end of my ~/.bashrc (This is on a Linode box) and logged out of my ssh session. source ~/.profile Now when I log in, the shell is unresponsive. I never get to the ...
2
votes
1answer
189 views

Bash Prompt Colors Ubuntu

I am attempting to use a simple shell script on a base Ubuntu 12.04 server install to set prompt colors for users system wide. I would like to have Puppet place the file color.sh in /etc/profile.d/ ...
4
votes
3answers
1k views

Use .bashrc without breaking sftp

My problem is that I need to set a few variables, and output a few lines every time I login to the ssh shell, and at the same time I have to be able to use sftp to tarnsfer files via Filezilla. Now, ...
0
votes
1answer
45 views

Command works independently, but not as SSH callback

A MySQL cloud server only allows remote access to a certain server (in this example, 11.22.33.44). Running the following commands from the terminal is verified to work: ssh -p 40000 ...
3
votes
2answers
191 views

Using Linux autocompletion with wordlist AND files of the current directory

I have set auto-completion in my .bashrc as follows: complete -W "$(echo `cat ~/.ssh_complete`;)" scp but this ONLY used the words given in the file ~/.ssh_complete. How is it possible to extend ...
0
votes
2answers
2k views

.bash_profile not being read

So I am using CentOS 6.3 a fresh install and I was trying to add things to my path for OpenMPI so I edited my .bash_profile file to read: FOO='test' export FOO # Add support for MPI ...
1
vote
1answer
273 views

Built local glibc, broke system, how do I ssh without parsing the .bashrc?

The cluster I am on had really old build tools and I needed to use CUDA5. I'm a pretty clever dude and I planned on building the necissary tools. So, I built a local copy of gcc, bintools, and ...
1
vote
1answer
63 views

Is there some place to put custom functions which are then sourced at startup? [closed]

I've written a what I think quite useful function and I want to make it public via GitHub. On my PC I have a .bash_functions file which I source into my .bashrc file. I know this is the common ...
5
votes
2answers
965 views

(solved) `ssh foo “<command/>”` not loading remote aliases?

summary: Why does this fail $ ssh foo 'R --version | head -n 1' bash: R: command not found but this succeeds $ ssh foo 'grep -nHe 'bashrc' ~/.bash_profile' /home/me/.bash_profile:3:# source the ...
1
vote
3answers
368 views

Automounting SAMBA share using the .bashrc

Is it possible to mount a Samba network share on start-up using the .bashrc file In my fstab I got //192.168.1.104/ant /media/ant cifs ...
2
votes
2answers
4k views

.bashrc: shopt: not found

Just provisioned a new Rackspace instance with Ubuntu 12.04 and pulled down rbenv from their github and installed it. I'm getting the following errors when executing . ./~bashrc $ . ~/.bashrc sh: ...
9
votes
4answers
2k views

How to use a custom .bashrc file on SSH login

I've found that with the new company I'm working with I often have to access linux servers with relatively short lifetimes. On each of these servers I have an account, but whenever a new one is ...
5
votes
1answer
492 views

bash tab completion only works for root

I set up an Ubuntu 12 server (on rackspace cloud using their preconfigured image) and created a non-root user. When I log in as the standard user, pressing [TAB] at the terminal outputs an actual tab ...
2
votes
2answers
457 views

.bashrc and .ssh/ disappearing seemingly at random

I have a server that has been running Fedora 16 ( 3.1.0-7.fc16.x86_64 ) for about a month now. I only log in every few days or weeks, but when I do, sometimes files are missing from my home directory. ...
0
votes
1answer
87 views

Can't get .bashrc to load

I can't get .bashrc to load on this machine... it's SUZE linux 10. I'm a bit frustrated because this seems very basic, create the file and it loads when you open a new shell connection. With the ...
1
vote
1answer
500 views

How can I disable CTRL+Z backgrounding in vim or nano?

I'm using stty susp ^- in a user's .bashrc shell in an attempt at preventing users from using CTRL+Z to background a process. The reason behind this, is that we have a number of users who are used to ...
1
vote
1answer
784 views

Can't change path location of PHP on mac os x snow leopard

I have XAMPP installed on my mac, and I want to make command line PHP use the same executable as XAMPP since I've customized that php's php.ini file. The php binary I want is located at: ...
0
votes
2answers
231 views

Can't succesffully install RVM in Ubuntu 11

I've installed RVM before in Debian and OSX without any problems, but doing it in Ubuntu is driving me crazy. I´ve tried different tutorials, this is the last of them. I think everything goes ...
2
votes
2answers
4k views

How do I reset default .bashrc (debian wheezy)? [closed]

I messed up my .bashrc file. How do I get to the default one that was initially created with my home directory?
1
vote
1answer
151 views

export_bashrc() bash function to export .bashrc to a server

I am trying to write a bash function shown below.I am trying to scp my .bashrc to the target machine.I want to do modify the following function in the below two ways. 1.I want to enter the password ...
1
vote
1answer
175 views

exporting bashrc file over an ssh connection

I have my bashrc file set up to my liking.I usually work on a hardware that is plugged into a remote server.I ssh into that remote server.I would like my .bashrc to be run when I ssh into the remote ...
2
votes
2answers
4k views

Solarized Colour Theme in .bashrc

I am looking to see if there is a way to implement the solarized them through just a .bashrc file. Would it be possible to do so? Has anyone tried this before? I guess I would start by modifying ...
1
vote
1answer
239 views

.bashrc doesn't get sourced after su'ing to root

I've got a CentOS 5.6 VPS and both root and my normal user account have identical copies of a .bashrc file in their home directories. The file contains a few basic aliases, etc. If I login to root, ...
0
votes
2answers
448 views

In Linux, how do I umask differently for files and directories?

I wish to have something in my .bashrc that will mask the file permissions as 022 (resulting in new files having permission rwxr--r--) and the directory permissions as 066 (resulting in new ...
3
votes
2answers
503 views

Why is my .bashrc script executing out of order / not waiting for steps to complete?

I have the need for teachers to fill in electronic registers in remote areas, and they need to be able to do it fast and with the least fuss necessary. To accomplish this I have set up netbooks with a ...
1
vote
2answers
1k views

How do you run “source” when starting a shell?

In order to use rvm (https://rvm.beginrescueend.com/), I need to run source ~/.bash_profile each time when I start a new shell. How do I automatically do this when I start my computer, rather than ...
-1
votes
3answers
577 views

Set alias or environmental variable in Unix

I have a VPS and an associated IP address for it. I'm doing a lot of work with it in my bash shell and I'm wondering if there's some way I can create either an alias or a environmental shortcut for ...
0
votes
2answers
678 views

In Ubuntu, does updating the CLASSPATH require a reboot?

I changed my CLASSPATH and JAVA_HOME variable to something like this JAVA_HOME=/usr/local/jdk1.6.0_24 export CLASSPATH=$CLASSPATH:/usr/local/tomcat/lib export JAVA_HOME And when I try to compile, ...
0
votes
2answers
419 views

Setting multiple paths to JAVA_HOME in Ubuntu

I am trying to set the JAVA_HOME path in Ubuntu from the .bashrc file I currently have something like export JAVA_HOME=/usr/local/jdk1.6.0_24 But I want to also add the servlet libraries in the ...
2
votes
3answers
1k views

How to Add Options to Bash Function

I'm new to linux (using Ubuntu 10.10) and I'd like to add a function to .bashrc that starts/stops a tomcat server. I'm trying to parse two options for the command "tomcat". I've tried the following ...
1
vote
1answer
354 views

Tilde expansion not working when I hit tab on ubuntu 10.10

I try to do this: cd ~git\t where the \t is tab character and I expect it to be expanded by bash_completion to this: cd ~gitolite/ but it doesn't. I've uncommented the following lines in ...
1
vote
2answers
123 views

Alias for Kate editor

How can I create an alias in .bashrc for Kate editor, in order not to write kate file1 file2, but k file1 file2 for opening those files.
1
vote
1answer
448 views

So Close: How to get this SSH login working (.bashrc)

Objective: SSH login ( + eliminate warning message) / run 2 commands / stay logged in: EDIT: Oops, I made a mistake (see below): This code does ~95% of what I wanted to do # .bashrc # Run two ...
13
votes
7answers
2k views

I screwed up, exit in .bashrc

I put "exit" in my .bashrc file. I don't have physical access to the machine so to connect to it I use ssh. I don't have root privileges. Every time I connect to the server, the connection ...
0
votes
2answers
83 views

Copying user account and all settings?

I recently performed a fresh install of Ubuntu 10.04 and tried to create the username that I wanted to create "Sean.Ochoa" (without the quotes), but it wouldn't let me... saying something about the ...
1
vote
1answer
189 views

sudo as a user that has sudo rights?

Alice has sudo rights. Bob does not (this is not changeable), but does know the password to Alice's account. If Bob wants to perform administrative commands he must: su alice fill in Alice's ...
3
votes
5answers
2k views

Prune duplicate entries from PATH variable

I modify my .bashrc frequently and then source it. However, when I have things like export PATH="~/bin:~/perl5/bin:$PATH" in my file, then the PATH environment variable grows every time I source the ...
1
vote
1answer
295 views

Where can $PATH be defined for non-login shell on Red Hat

I need to add a directory to the path for non-login shells on a Red Hat Server. ssh user@server echo \$PATH returns /usr/local/bin:/bin:/usr/bin How can I add a directory to this path. I ...
4
votes
2answers
808 views

linux: how to permanently and globally change environment variables

I want to do the following for every user that logs into my linux box: export PATH=$PATH:~/.path And I don't know how to do that besides manually adding that line in every ~/.bashrc file. Also, a ...