Where Do I Create Alias in Linux?
Contents Creating a Linux Alias Is Very Easy. You Can Either Enter Them at the Command Line as You’re Working, or More Likely, You’ll Put Them in One of Your...
Creating a Linux alias is very easy. You can either enter them at the command line as you’re working, or more likely, you’ll put them in one of your startup files, like your . bash_profile or . bashrc files, so they will be available every time you log in.
How do I create an alias?
An alias declaration starts with the alias keyword followed by the alias name, an equal sign and the command you want to run when you type the alias. The command needs to be enclosed in quotes and with no spacing around the equal sign. Each alias needs to be declared on a new line.
How do I create an alias in Unix?
To create an alias in bash that is set every time you start a shell:
- Open your ~/. bash_profile file.
- Add a line with the alias—for example, alias lf=’ls -F’
- Save the file.
- Quit the editor. The new alias will be set for the next shell you start.
- Open a new Terminal window to check that the alias is set: alias.