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 07-29-2004, 01:08 PM   #1
Acetylcholine
LQ Newbie
 
Registered: Jun 2004
Distribution: Ubuntu
Posts: 24

Rep: Reputation: 15
Permanent aliases


Im using bash and I want to know what config file stores the permanent aliases?

because
alias ffox=/usr/local/firefox/firefox

works till log out

Thanks.
 
Old 07-29-2004, 01:12 PM   #2
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
I would put it on my ~/.bashrc as home configs files are good for customs settings without touch system files
 
Old 07-29-2004, 01:30 PM   #3
AhYup
Member
 
Registered: Mar 2004
Distribution: Suse
Posts: 85

Rep: Reputation: 15
This seems to be a little different in differnent systems. The system default for all Bourne shells in Slackware is /etc/profile If you put your alias there than it will be useable in any login.
I thought that you would want .profile in your home setting for Slack as well but
Cedrik may be right.
 
Old 07-29-2004, 03:19 PM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
The info bash page gives information on the different startup shells that bash reads in when starting up. The .bashrc file is read in every time a new shell is opened, while .bash_profile is read in when a login shell is starting.

Your distro probably has a .bash_profile or .profile script sourcing the .bashrc, so it is run even when first logging in.
This webpage contains a good wrapup:
http://www.comptechdoc.org/os/linux/...vironment.html
from the above webpage:
$HOME/.bash_profile - Users environment stuff and startup programs
$HOME/.bashrc - user aliases and functions
$HOME/.bash_logout - User actions to be done at logout
$HOME/.inputrc - Contains keybindings and other bits.




One thing that determines which script to write is determined on the shell you might use. .profile is read in by both bash and
 
Old 07-29-2004, 05:39 PM   #5
Acetylcholine
LQ Newbie
 
Registered: Jun 2004
Distribution: Ubuntu
Posts: 24

Original Poster
Rep: Reputation: 15
Thanks. I picked this up in the meantime in the case of global aliases:
(http://www.bellevuelinux.org/alias.html)

The root user can create aliases just for its own use, or it can create them for any or all other users. On Red Hat Linux, aliases for the root user can be made permanent by entering them in the .bashrc file in the root's home directory, i.e., /root/.bashrc. System-wide aliases can be put in /etc/bashrc. The system needs to be restarted before system-wide aliases can take effect.



Thanks!
 
Old 08-04-2004, 02:08 AM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Mandrake has a alias.sh file that is sourced by the startup scripts. This keeps the global aliases in one place, by themselves so there is less chance of mucking up the startup scripts.
 
Old 01-06-2005, 03:29 PM   #7
ksun
Member
 
Registered: Sep 2003
Posts: 52

Rep: Reputation: 15
You might consider this slightly off topic, but a solution to the originally stated problem might be to install the firefox stuff in a place like /usr/lib and put a symlink in /usr/bin

Alternatively, it is a pretty common practice for some people to create a ~/bin directory and put that in their path. You could put a symlink there for just your use.

Like I said, it doesn't really follow what everyone else was talking about, but it might be a couple different solutions to your stated problem.
 
  


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
/etc/hosts permanent changes? kpachopoulos Linux - Networking 1 07-10-2005 05:03 PM
Permanent Command Aliases - Slackware 9.1 erraticassassin Slackware 3 01-09-2005 03:08 PM
Permanent IP address linksocc Linux - Networking 2 10-10-2003 10:56 PM
permanent mount jerrod Linux - Newbie 4 04-14-2003 06:36 PM
IP assignment - permanent? dalraidia Linux - Networking 1 12-13-2002 10:55 AM

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

All times are GMT -5. The time now is 11:03 PM.

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