ls prints what's inside a folder. Given no arguments, it lists your
current folder. Given a path, it lists that folder.
ls # current folder
ls /etc # specifically /etc
On a fresh machine your home folder can look empty, because its only
files are hidden (their names start with a dot). A populated folder
like /etc shows the difference right away.
The plain output shows names only. Useful, but not the whole picture. Add
-l (lowercase L, for "long") and every entry expands into a row with
metadata:
ls -l /etc
A single row looks like this:
drwxr-xr-x 2 root root 4096 Feb 10 14:22 nginx
Seven columns worth reading:
d says this is a directory. A - in that position means a regular file.rwxr-xr-x is the permissions preview. You'll unpack this in a later topic.2 is the link count. Ignore it for now.root is the owner.root is the group.4096 is the size in bytes.Feb 10 at 14:22) show when the file was last modified.nginx is the name.For now, focus on the first character (file or folder?) and the last few columns (size, date, name). The rest becomes useful once you learn about permissions and ownership.