Navigation
The ls command
Lists the content of a folder. With no arguments, the current one.
Syntax
ls [opciones] [ruta]Most useful options
-lLong listing: permissions, owner, size and date-aAlso shows hidden files-hHuman-readable sizes (K, M, G)-RRecurses into every folderCopy-ready examples
$ lsThe current folder$ ls -l DocumentosDetails of Documentos$ ls -lahEverything, with details and readable sizesYou can try them in the browser terminal: it does not touch your computer.
Typical mistakes
- By default it hides the dotfiles (those starting with a dot).
FAQ
Why can I not see a file I know exists?
It is almost certainly hidden: use ls -a.
How does ls -l differ from stat?
ls -l summarises; stat gives all the technical data.
Learn to actually use it
The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.
Start the free course