How do I create an alias in Unix?

Danh Trịnh

New member
How do I create an alias in Unix?
Answer
To create an alias in bash that is set every time you start a shell:
  1. Open your ~/. bash_profile file.
  2. Add a line with the alias—for example, alias lf=’ls -F’
  3. Save the file.
  4. Quit the editor. The new alias will be set for the next shell you start.
  5. Open a new Terminal window to check that the alias is set: alias.
 

Tìm kiếm

Back
Top