You are not logged in.

#1 2013-01-13 02:19:53

skipperx
Member
Registered: 2012-12-09
Posts: 19

[SOLVED].bash_profile question

I added aliases into my .bash_profile and they have no effect after booting. It does not matter whether I put them at the beginning or the end of the file. They would become active after I source the .bash_profile. It is a recent install and the .bash_profile is the short default one. I thought that .bash_profile got processed on booting. What should I do to make it get processed on booting? I am assuming of course that it is a good place to put aliases. Thank you.

Last edited by skipperx (2013-01-13 02:37:12)

Offline

#2 2013-01-13 02:29:52

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 14,190
Website

Re: [SOLVED].bash_profile question

It does not get processed "on booting".  It get's processed when you log in.  Are you logging in to a tty?  Or do you use a display manager to log in to X?  If it's the latter and you want to use aliases in terminal emulators, you'll want to put them in your .bashrc.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#3 2013-01-13 02:35:40

ronmon
Member
Registered: 2011-04-15
Posts: 29

Re: [SOLVED].bash_profile question

Aliases should go in ~/.bashrc My ~/.bash_profile references .bashrc with a section like this:

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
    . ~/.bashrc
fi

Those files get sourced on login, not boot.

Offline

#4 2013-01-13 02:36:45

skipperx
Member
Registered: 2012-12-09
Posts: 19

Re: [SOLVED].bash_profile question

Thanks, Trilby. I am logging from a display manager. I moved them to the .bashrc and they work now.

Offline

Board footer

Powered by FluxBB