LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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, 02: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, 02:12 PM   #2
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 242Reputation: 242Reputation: 242
I would put it on my ~/.bashrc as home configs files are good for customs settings without touch system files
 
Old 07-29-2004, 02: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, 04:19 PM   #4
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
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, 06: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, 03:08 AM   #6
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
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, 04: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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


All times are GMT -5. The time now is 01:26 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration