5

Not a fan of touchpads, so I tend to do all of my regular file navigation in the terminal. I've done cd path/to/whatever <enter> ls so many times that it's just muscle memory now and feels more natural than using a GUI to navigate files. However, sometimes when there's a lot of files stacked in several columns, it can be less than intuitive to find what I'm looking for. I know I can just to ls -l to list them like that (plus some extra info), but I don't what to have to type that every time. But even if there was a way to just permanently tag the -l flag onto every ls command, that would work too. Anyone know how I can accomplish this? Also, it would be nice if once this were accomplished there was a way to tag something onto an ls command in case every once in a while I did need to list them the normal way.

1 Answer 1

4

It is very easy. Add a line

alias ls='ls -l'

to your ~/.bashrc file and restart the terminal.

You will be able to run ls a normal way without -l this way

\ls
1
  • @Nathan there's also ls -1 which stacks in one column without the extra detail.
    – terdon
    Sep 11, 2015 at 11:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .