How to Create Alias in Linux?
Contents How Do I Permanently Create Alias in Linux? Luckily for Us, This Is Simple to Do in the Bash-Shell. Open Your. Bashrc. Your. Bashrc File Is Located in...
Contents
How do I permanently create alias in Linux?
Luckily for us, this is simple to do in the bash-shell.
- Open your .bashrc. Your .bashrc file is located in your user directory.
- Go to the end of the file. In vim, you can accomplish this just by hitting “G” (please note that it is capital).
- Add the alias.
- Write and close the file.
- Install the .bashrc.
Must Read
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.