How To Add Permanent 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. Open the .bash_aliases file in a text editor (e.g., nano, vim).
2. Add a line for the alias you want to create. The line should look something like this:
alias alias_name=’command_to_run’
3. Save and close the file.
4. To activate the alias, run the following command:
source ~/.bash_aliases
5. To test the alias, use the alias_name in your terminal.