Are you refering to shell aliases? For example, lines like:
alias 'dir'='ls -l'
Slackware does not provide an alias file - you have to write your own. Fortunately, this is not difficult.
The alias command is a shell command like any other, and can be run from the command line, from ~/.bash_profile, ~/.bashrc, or any other script you want to run. Here's how I set up my aliases, in case it helps.
1) Using your favorite text editor, create a ~/.bash_alias file. Put your aliases here. For example:
alias 'xterm'='xterm -ls'
alias 'vi'='gvim'
alias 'ls'='ls -la'
2) In your ~/.bash_profile, add the following
Code:
if [ -e $HOME/.bash_alias ]
then
source $HOME/.bash_alias
fi
Next time you log in, the aliases in ~/.bash_alias will be in effect. If you want them to take effect immediately, just type
source ~/.bash_alias
and you're all set. Hope that helps!
man bash:
--rcfile file
Execute commands from file instead of the standard personal initialization file ~/.bashrc if the shell is interactive (see INVOCATION below).
man dircolors:
DESCRIPTION
dircolors is a program to generate a setup for the color version of GNU ls. The setup consists of an LS_COLORS environment variable and a set of aliases. For sh and ash, which lack aliases, shell functions are substituted. The dircolors command will generally be run from the user's .profile, .cshrc or equivalent file, or the system-wide equivalents.
CONFIGURATION FILE
If a filename is specified on the command line, it will be used to generate the setup, if not, the file .dir_colors in the users home directory will be used. If that file does not exist either, the system-wide file of /etc/DIR_COLORS will be used.
haneo,
Slackware keeps the default bash login script in /etc/profile. Just copy /etc/profile to ~/.bash_profile and edit that file. Note that if you find it easier, you can also add your aliases directly to your ~/.bash_profile. It's a little messier, but it works just as well.
As Sky1953 noted, aliases for ls colors are setup by the dircolors command. In addition to the system defaults in /etc, you can also use the ~/.dir_colors (I think) to configure this. Not that it's the config file, not the actual alias, that determines what colors are used. Check the man page for more detailed information.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.