LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Sabayon (https://www.linuxquestions.org/questions/sabayon-86/)
-   -   alias configuration file (https://www.linuxquestions.org/questions/sabayon-86/alias-configuration-file-863903/)

pranuttarwar 02-20-2011 02:22 PM

alias configuration file
 
how can set permanunt aliases in sabayon o. s.

fordeck 02-20-2011 03:01 PM

Have you tried putting them in .bash_aliases or .bashrc in your users home directory? In order for them to take affect you exit logout and back in again. I don't use sabayon however this works for RedHat/Fedora and Ubuntu distros.

Regards,

Fordeck

pranuttarwar 02-21-2011 07:17 AM

but not found /etc/aliases configuration file in sabayon

jschiwal 02-21-2011 07:43 AM

Read though your bash startup scripts (bashrc, profile, bash_login) for a line that tests for an aliases file and runs it if it exists. You can create that file if it doesn't exist. Mine looks for ~/.aliases.

If it doesn't exist, you can add alias definitions to ~/.profile or ~/.bash_login whichever your system uses.
Lately, distros have system shell startup files in /etc/profile.d/.

On my system, my aliases are defined in /etc/bash.bashrc but since this file can be replaced in an update, /etc/bash.bashrc would be used for changes instead.

You could grep files in /etc/ looking for an alias you have.
E.G.:
grep "alias md='mkdir -p'" /etc/* 2>/dev/null


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