Setting aliases with alias

Aliases are nicknames of sorts that you use to enter commands more easily. For example, if you frequently use the command mail -s "Lunch today? deb .signature, you could set an alias for this command and call it lunch. Then, in the future, all you have to do is type in lunch, and the result is the same as if you typed in the longer command (Figure 8.7).

Figure 8.7. Setting aliases can keep you from typing long names and code.

To set an alias with alias:

1.
Choose the appropriate file to edit, depending on which shell you're using.
  • bash users should use ~/.bashrc.

  • ksh users should use ~/.kshrc.

  • csh users should use ...

Get Unix: Visual QuickStart Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.