aliases in .profile don't work?
Knute Johnson
ubuntu at knutejohnson.com
Wed Dec 8 23:46:04 UTC 2010
On 12/08/2010 03:19 PM, Marius Gedminas wrote:
> On Wed, Dec 08, 2010 at 02:46:25PM -0800, Knute Johnson wrote:
>> Anybody know why putting an alias in ~/.profile doesn't work but putting
>> it in ~/.bash_aliases does?
>
> ~/.profile is sourced for login sessions only (both ssh logins and gdm
> logins, the latter thanks to Ubuntu's /etc/gdm/Xsession). Aliases
> aren't exported via the environment, so any new shell sessions -- such
> as those you get by opening a terminal window -- do not inherit them.
>
> ~/.bash_aliases is sourced for every new shell session.
>
>> ~/.bash_profile or ~/.bash_login do NOT
>> exist. Adding a change to the PATH works just fine in ~/.profile.
>
> PATH is usually exported via the environment, so setting it in ~/.profile
> is sufficient.
>
> Marius Gedminas
>
Thanks very much Marius. That explains why it works when I log into my
server but not on my desktop.
Thanks again.
knute...
More information about the ubuntu-users
mailing list