Add New Shortcut Command in Linux

To add new shortcut command in linux follow the bellow steps.

step 1. run the command in terminal

$ vim .bashrc

Insert the bellow command as alias under “# User specific aliases and functions”. as example
alias statushttpd = ‘sudo systemctl status httpd’

Save the file and type the following command in terminal

$ bash ~/.bashrc

In terminal type the alias statushttpd. the command will be executed.

Thats it.

Leave a Reply

Your email address will not be published. Required fields are marked *