Define an Alias
The first example causes ls -l to be executed when the command ll is entered:
alias ll ls -l
Show all defined Alias
alias
Show Alias for specific Alias
alias ls
Alias File – .bash_aliases
The alias file located in ~/.bash_aliases is executed on startup.
Below is an example of .bash_aliases.
cat ~/.bash_aliases alias pj="ps -fA|grep java" alias rd="rm –rF " alias home="cd ~ " alias +='pushd .' alias -='popd' alias ..='cd ..' alias ...='cd ../..' alias beep='echo -en "\007"' alias dir='ls -l' alias home='cd ~ ' alias l='ls –alF --color=auto ' alias la='ls -la' alias ll='ls -l' alias ls='/bin/ls $LS_OPTIONS' alias ls-l='ls -l' alias mc='. /usr/share/mc/bin/mc-wrapper.sh' alias md='mkdir -p' alias o='less' alias rd='rmdir' alias rehash='hash -r' alias unmount='echo "Error: Try the command: umount" 1>&2; false' alias which='type -p' alias you='su - -c "/sbin/yast2 online_update"'
Executing an Alias file
~/.bashrc
Delete an defined Alias
alias ll=
Leave a Reply