How to create an Aliases Persistent
While creating an alias in the terminal is useful for the current session, users may want to make aliases persistent across sessions. To do this, add the alias command to your shell configuration file (e.g., ‘.bashrc’ for Bash or ‘.zshrc’ for Zsh). This ensures that your aliases are loaded each time you start a new terminal session.
echo "alias lsa='ls -la'" >> ~/.bashrc
How to Create and Use Alias Command in Linux
Imagine you’re lost in a maze of complicated Linux commands. You stumble upon a secret doorway marked “Alias,” and inside you find shortcuts to all your favorite commands! That’s what creating aliases is like. You get to make your own mini-commands for the long ones you use all the time, making things simpler and faster. This article guides you through building these shortcuts, turning you into a master of the Linux command jungle! No need for fancy tech words, we’ll keep it clear and fun, like chatting with a friend.
Table of Content
- What is an alias in Linux
- Syntax of alias Command in Linux
- Options Available for Alias Command
- How to Create and Use Alias Command in Linux
- How to Remove an Alias
- How to create an Aliases Persistent
- Using Alias Command Effectively
- Commonly Used Aliases
- Frequently Asked Question on Alias – FAQs