How To Add Alias In Linux?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
1. To add an alias in Linux, open the terminal and enter the following command:
alias <name>=”<command>”
2. For example, to create an alias “p” for the “pwd” command, enter:
alias p=”pwd”
3. To make the alias permanent, add it to your shell’s configuration file, such as .bashrc or .profile, depending on your shell.
4. Finally, to activate the alias, run the following command:
source ~/.bashrc (or source ~/.profile)