Search code examples
linuxls

How can I set default arguments for "ls" in Linux?


Im constantly doing "ls -ahl" whenever I want to list what is in the directory. Is there a way for me to make -ahl the default args passed when I do "ls" or should I just create an alias like "alias lsa=ls -ahl" in bash_profile?


Solution

  • You could just alias ls itself. So something like:

    alias ls='ls -ahl'