How to remove an alias?

0156

To remove an alias in your shell, you can use the unalias command followed by the name of the alias you want to remove. Here’s the syntax:

unalias alias_name

Example

  1. Open your terminal.

  2. Remove the alias. For example, to remove the alias ll, you would type:

    unalias ll
  3. Verify the removal. You can check if the alias has been removed by typing:

    alias

Note

If you want to remove all aliases at once, you can use:

unalias -a

Keep in mind that if you have added the alias to your shell's configuration file (like ~/.bashrc or ~/.zshrc), you will need to remove it from there as well to prevent it from being recreated in future terminal sessions.

0 Comments

no data
Be the first to share your comment!