PDA

View Full Version : [ubuntu] [SOLVED] bash_profile



inter-m
May 3rd, 2008, 03:56 AM
hi
im trying to learn some scripting... and now i reached a point were im suposed to make an alias in the .bash_profile... i cant find that file for some reason... is it the same as the .bashrc... i also tried creating .bash_profile in my home dir and i edited in my alias but nothing seems to take place... i would like for someone to point into the right direction... thank u in advance...
K.H.

glennric
May 3rd, 2008, 03:59 AM
Aliases are usually put in .bashrc
They won't take effect immediately. You will have to close the terminal and reopen it.

noynac
May 3rd, 2008, 04:00 AM
Please delete

glennric
May 3rd, 2008, 04:02 AM
Please delete

What?

inter-m
May 3rd, 2008, 04:04 AM
Aliases are usually put in .bashrc
They won't take effect immediately. You will have to close the terminal and reopen it.

thanx for the info... but im still confused on the .bash_profile... and i tried closing the terminal and opening it again but nothing took effect...

olejorgen
May 3rd, 2008, 04:09 AM
.bash_profile is only read at login
.bashrc is read whenever bash is opened, so you want to put your aliases there.

If you put them in .bash_profile, my guess is that they'll only work in the shell where you logged in from. (or not at all)

inter-m
May 3rd, 2008, 04:19 AM
.bash_profile is only read at login
.bashrc is read whenever bash is opened, so you want to put your aliases there.

If you put them in .bash_profile, my guess is that they'll only work in the shell where you logged in from. (or not at all)

thanks....
the alias work in the .bashrc after i relogged in... but didnt work with the .bash_profile... so ill stick with the .bashrc... thaks all...

K.H.

noynac
May 3rd, 2008, 04:29 AM
What?

I meant to say please delete my posting. It duplicated the previous posting.

ABX323
May 3rd, 2008, 04:41 AM
You can make temp alias on the fly with the alias="command some args" just for that bash session in the CL.