Do all shells have aliases? Is there something else that can be used?

Do all shells have aliases? Is there something else that can be used?

All of the major shells other than sh have aliases, but they
don't all work the same way. For example, some don't accept
arguments.

Although not strictly equivalent, shell functions (which exist in
most shells from the Bourne shell category) have almost the same
functionality of aliases. Shell functions can do things that
aliases can't do. Shell functions did not exist in bourne shells
derived from Version 7 Unix, which includes System III and BSD 4.2.
BSD 4.3 and System V shells do support shell functions.

Use unalias to remove aliases and unset to remove functions.



Home FAQ