In this post i will show you how to create alias for long commands in terminal.
There is two way to do that
- Use alias command in your terminal
- Changing the .bashrc file
it will map ls command to files(and the name is completely your personal choice you can use whatever like:-nobita )
but the drawback is you can't use the alias in different terminals you have to use the command in that terminal only
open your root path of the system and find .bashrc file (remember it uses '.' in prefix so that file may be hidden for you to show the hidden file press ctrl+H in keyboard
then you can show your hidden files)
and write the following command. You can use your own custom alias and by adding alias directly to your .bashrc file you can use the alias in different terminal also
alias pg="ping google.com"
if you use zsh as your default terminal then change .zshrc file