FreeKB - Linux Commands alias (create commands)
Linux Commands - alias (create commands)

The alias command is used to create a command that will invoke another command. In this example, the dte command will invoke the date command.

alias user=whoami

 

The user command now returns whoami.

~]$ user
john.doe

 

The unalis command can be used to remove the alias.

unalias user

 

The alias command will not survive when the user logs out or the system is restarted. To create a permanent alias, the alias would need to be created in /home/username/.bash_profile, like this.

alias user=whoami
export alias

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter b2fc0 in the box below so that we can be sure you are a human.




Comments

Web design by yours truely - me, myself, and I   |   jeremy.canfield@freekb.net   |