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. |
I would put it on my ~/.bashrc as home configs files are good for customs settings without touch system files
|
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. |
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 |
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! |
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.
|
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. |
All times are GMT -5. The time now is 05:53 PM. |