LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Does Slack have an equivalent to .bashrc? (https://www.linuxquestions.org/questions/slackware-14/does-slack-have-an-equivalent-to-bashrc-386706/)

thorney 11-26-2005 11:45 AM

Does Slack have an equivalent to .bashrc?
 
Hi,

Is there an equivalent to .bashrc and .bash_profile for setting up aliases to long commands in Slackware 10.2? I'm used to this possibllity in FC4!

thanks

reddazz 11-26-2005 11:57 AM

You have to create them yourself.

thorney 11-26-2005 12:12 PM

Ok so I created the file .bashrc like so:

alias g+++="g++ -ansi -pedantic -Wall"

and then logged out and logged back in and the shell still doesn't recognize g+++. I'm still a newbie!!!!

reddazz 11-26-2005 12:13 PM

g+++ or g++

thorney 11-26-2005 12:18 PM

Won't recognize g+++, g++ is installed and good to go!

keefaz 11-26-2005 12:36 PM

You don't have to logout and login to test your .bashrc,
simply do :
Code:

source ~/.bashrc
.. after each bashrc change to load them

Your alias works perfectly here, make sur .bashrc is in the root
of your home directory, also type : " alias " to see your loaded aliases

thorney 11-26-2005 12:53 PM

I tried source ~/.bashrc and then the alias worked.

thanks

keefaz 11-26-2005 01:08 PM

Ok, I see
Try create ~/.bash_profile with the content :
Code:

if [ -f $HOME/.bashrc ]; then
        source $HOME/.bashrc
fi

So .bashrc should be loaded when you login


All times are GMT -5. The time now is 02:30 PM.