The easiest and quickest way to run frequently used commands in

Published: 30 January 2023
on channel: The Lazy SysAdmin
1,740
125

In Linux, the alias command allows you to create short commands for longer commands.

This makes it easier and quicker to run frequently used commands by typing only the alias.

Aliases are created using the alias command followed by the desired alias name, an equal sign (=), and the command you want to associate with the alias.

It's important to note that aliases are only valid for the current session. If you want to make the alias permanent, you need to add it to your shell startup file, such as .bashrc

After adding an alias to your .bashrc file, you need to reload the file in order to make the alias available in your current terminal session.

Using "Group commands" in alias allows you to automate a series of frequently used commands and run them all with a single, easy-to-remember alias.

For example, if you regularly run the following commands to update your system.

apt update
apt upgrade
apt autoremove
apt autoclean

You could create a single alias named update with the following command.

alias update='apt update && apt upgrade && apt autoremove && apt autoclean'

Now, whenever you need to update your system, you can simply run the update alias instead of typing out the entire series of commands.

PLEASE SUBSCRIBE :)
PLEASE HIT LIKE IF IT HELPED :)

GIVE SUPPORT -   / lazysysad  
BUY ME A COFFEE - https://www.buymeacoffee.com/lazysysad
PAYPAL - https://www.paypal.com/donate/?hosted...

Drop me your feedback and comments.

That's all for now.

If this video helped you in any way, please like share and subscribe!

Thank you!!!


Watch video The easiest and quickest way to run frequently used commands in online without registration, duration hours minute second in high quality. This video was added by user The Lazy SysAdmin 30 January 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 1,740 once and liked it 125 people.