Aliases

Using aliases within the shell can greatly improve your efficiency, especially if you are new to UNIX. Aliases enable you to assign an alternate name to a command or a combination of commands. You’ll use aliases to personalize your environment.

Aliases are not supported in the Bourne shell, but here is how they are set in the Korn shell. Defining an alias is much like setting a variable. The syntax for setting an alias using the alias command is as follows:

alias aliasname=value
					

For example, to create an alias named del that will be the equivalent of typing the rm command, type the following:

alias del=rm 

If you use any whitespace in your value, make sure you use quotes as follows:

alias del='rm –i' 

To list all of your aliases, ...

Get Inside Solaris™ 9 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.