Linux alias tips

In this tutorial, How do I  use alias command to stop and start service with human language.

Linux alias tips

For example, you execute command "vagrant halt app1" to stop server app1  or "vagrant halt db" to stop server db in Vagrant. you can use alias command the define command  "stop_app1" or "stop_db"

Step 1: Add command end of line in .bashrc file 

[huupv@huupv ~]$ vim .bashrc

The terminal output as below


Step 2: Apply the change

[huupv@huupv ~]$ source .bashrc


The screen output terminal:
[huupv@huupv ~]$ cd my_ansible/example01/
[huupv@huupv example01]$ stop_app1
DEPRECATION: The 'sudo' option for the Ansible provisioner is deprecated.
Please use the 'become' option instead.
The 'sudo' option will be removed in a future release of Vagrant.

==> app1: Attempting graceful shutdown of VM...
[huupv@huupv example01]$ stop_db
DEPRECATION: The 'sudo' option for the Ansible provisioner is deprecated.
Please use the 'become' option instead.
The 'sudo' option will be removed in a future release of Vagrant.

==> db: Attempting graceful shutdown of VM...

Conclusion

Thought the article, you can use Linux alias tips as above . I hope will this your helpful.

Comments

Popular posts from this blog

Bash script list all IP addresses connected to Server with Country Information

zimbra some services are not running [Solve problem]

Whitelist and Blacklist domain in zimbra 8.6