Getting .bashrc to work on MediaTemple’s Grid Service
I’m spoiled, guys and gals. I can’t work without [my dotfiles](https://github.com/njbair/dotfiles). Watching me work in a vanilla bash shell is excruciating, like watching someone walk with those drunk-driving goggles–fumbling and stumbling through an environment completely devoid of the shortcuts and settings upon which I’ve come to rely so heavily. Even for something as simple as listing and switching directories:
njbair@n16 ~ $ ll -bash: ll: command not found njbair@n16 ~ $ ls -l lrwxrwxrwx 1 njbair njbair 10 Sep 20 05:38 data -> ../../data/ lrwxrwxrwx 1 njbair njbair 13 Sep 20 05:38 domains -> ../../domains/ njbair@n16 ~ $ cd domains njbair@n16 domains $ ll -bash: ll: command not found njbair@n16 domains $ ls -l drwxr-xr-x 4 njbair www-data 5 Sep 20 05:38 example.com/ lrwxrwxrwx 1 njbair njbair 6 Sep 20 05:38 sXXXXXX.gridserver.com -> example.com/ njbair@n16 example.com $ ll -bash: ll: command not found njbair@n16 example.com $ kill me now
Fortunately, `kill me now` was not installed on that machine.
I’ve been a long-time customer of MediaTemple’s dedicated hosting packages, but only recently set up my first **(gs)** shared hosting account. I’m really happy with the whole service so far. But after enabling SSH for my account, I hit a snag while installing my dotfiles: *.bashrc* wasn’t working. I could manually source the file, but it wasn’t loading upon login. Fortunately, the fix was pretty easy.
### The Fix
So, you’ve set up SSH access on a MediaTemple Grid Service account, but can’t get your *.bashrc* to load? Try this:
echo “if [ -f ~/.bashrc ]; then source ~/.bashrc; fi” » ~/.bash_profile
Then logout and log back in.
### What just happened?
MediaTemple’s Grid SSH access doesn’t read *.bashrc* by default. This is because of political pressures relating to the high-stakes game of world diplomacy and international intrigue. Or maybe [there’s a reasonable technical explanation](http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html).
Hope this helps!