Re: aliases in .profile don't work?

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
Did you hear that the author of _Nitpicking for Dummies_ has just
received it back from the publisher with the 182nd set of editorial
-- Bill Snyder

Attachment: signature.asc
Description: Digital signature

ubuntu-users mailing list
Modify settings or unsubscribe at:

Relevant Pages

  • Re: Limiting users to logging on to one workstation at a time
    ... Limiting the number of logins per user from any machine in the domain, ... including Terminal Server sessions. ... specific criterion (e.g. all the logged-on sessions to a specific client ... Easy management and configuration by integrating to the Active Directory ...
  • Re: Tru64 w command reports an idle user which doesnt exist ? Is utmp corrupt ?
    ... > sessions that exit gracefully log in utmp. ... hundred logins a day, so surely it should have been re-used. ...
  • Re: aliases in .profile dont work?
    ... logins, the latter thanks to Ubuntu's /etc/gdm/Xsession). ... so any new shell sessions -- such ... Marius Gedminas ...
  • RE: countif where condition should be met
    ... Not sure why the durations are in rows 2:1265 and times are in 977:1013? ... will return logins before or at 12:00 with a duration less than 15 mins. ... The second counts the number of sessions based on the durration. ... I will create separate functions for each question. ...
  • Re: Temporary tables
    ... I guess it depends on how the Terminal Services sessions are configured. ... But as far as I know, the TEMP environment variable can be relied on to ... the database will create its temporary mdb in a different folder from ...