alias

CentOS Linux alias command

The ‘alias’ command in CentOS allows for you to create an alias to a command. For example, if you want to use the vim text editor, but are used to typing vi file-to-edit.txt, you can create an alias to automatically start vim instead of vi when typing the command.

Showing current aliases

To show the currently configured aliases for your shell simply type ‘alias’ with no arguments.

alias

Setting an alias

To set an alias to use vim for when vi is typed the following syntax would be used.

alias vi='/usr/bin/vim'

Removing an alias

To remove an alias you use the unalias command, for example to remove the previous vi to vim example you would type.

unalias vi

Those are the basics of the command, for more info see the manpage.

man alias
(Comments)

Comments