ls prints the names of the files in a directory. With nothing after it, it lists the current directory. With a file name, it lists that one file; with a directory name, it lists what is inside.

Without options the names are sorted by character order and packed into columns. -l switches to one file per line and adds the type, the permissions, the owner, the size and the time. -a adds the names beginning with a dot, which are otherwise left out.

The order can be changed. -t sorts by time, -S by size, and -r reverses whichever order is in effect. These combine, so ls -lrt is one file per line, oldest first.