LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-26-2005, 11:45 AM   #1
thorney
Member
 
Registered: Jul 2005
Location: Canada
Distribution: Ubuntu Hardy
Posts: 98

Rep: Reputation: 15
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
 
Old 11-26-2005, 11:57 AM   #2
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
You have to create them yourself.
 
Old 11-26-2005, 12:12 PM   #3
thorney
Member
 
Registered: Jul 2005
Location: Canada
Distribution: Ubuntu Hardy
Posts: 98

Original Poster
Rep: Reputation: 15
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!!!!
 
Old 11-26-2005, 12:13 PM   #4
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
g+++ or g++
 
Old 11-26-2005, 12:18 PM   #5
thorney
Member
 
Registered: Jul 2005
Location: Canada
Distribution: Ubuntu Hardy
Posts: 98

Original Poster
Rep: Reputation: 15
Won't recognize g+++, g++ is installed and good to go!
 
Old 11-26-2005, 12:36 PM   #6
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
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

Last edited by keefaz; 11-26-2005 at 12:37 PM.
 
Old 11-26-2005, 12:53 PM   #7
thorney
Member
 
Registered: Jul 2005
Location: Canada
Distribution: Ubuntu Hardy
Posts: 98

Original Poster
Rep: Reputation: 15
I tried source ~/.bashrc and then the alias worked.

thanks
 
Old 11-26-2005, 01:08 PM   #8
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Slack 9.1 won't read /etc/bashrc GATTACA Slackware 18 11-15-2004 10:23 AM
Slack and .bashrc Tinkster Slackware 16 05-10-2004 11:40 PM
.bashrc help shanenin Linux - Software 4 02-14-2004 06:17 PM
.bashrc f0rmula Linux - Software 24 12-28-2003 09:43 PM
no .bashrc? mattman Slackware 6 06-10-2003 03:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration