I am currently looking for a software/web development job preferably as a Rails-based developer.
Please email me at weston@westonganger.com. Thanks in advance for any leads!

Bash.rc And Environment Variables Not Loading On SSH

Posted by Weston Ganger

I was having some issues with my .bashrc file not being loaded when SSHing.

To fix it add this to the beginning of your .profile file.

# ~/.profile

# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
  . "$HOME/.bashrc"

Also if you are running a non-interactive SSH shell such as when using Capistrano or another tool, you must make sure you set your variables before this line in your .bashrc

# ~/.bashrc


# If not running interactively, don't do anything
[ -z "$PS1" ] && return

Related External Links:

Article Topic:Software Development - Linux

Date:May 31, 2015

Recommended Posts