Skip to main content
The 2024 Developer Survey results are live! See the results
edited title; edited tags
Link
Vlastimil Burián
  • 29.1k
  • 62
  • 197
  • 329

How to overwrite aliases in linuxmy shell (Oh My Zsh)?

edited title
Link
Farhad
  • 93
  • 1
  • 7

How to overrideoverwrite aliases in linux?

Source Link
Farhad
  • 93
  • 1
  • 7

How to override aliases in linux?

I would like to alias my ls command, but there is a previously defined alias for it which I believe gets invoked first before my definition! I am using .zshrc to define my alias, and here is what I did:

alias ls="ls --classify --almost-all --group-directories-first"

And here is the alias command output:

$ alias | grep "ls="
ls='ls --color=tty'

Is there any possible actions to see where that another alias has been defined? Or overwrite it with the new one?

Note: I use ZSH, and I've already searched for it in .profile and other related files I knew might help. If there is any file I need to check, comment please.