Using Aliases in CentOS

Aliases are a way of assinging a complex command to an easy to remember word. Looking at the command below:

ip addr |grep '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}'

This returns just the IP part of the output from an ip addr command, making the output much easier to read, however remembering and typing the command requires more effort than it saves. For this then we can create an alias.