Commands, Arguments, and Getting Unstuck

The shape of every command. There is only one shape, and once you see it the whole system stops looking arbitrary.

`

command -flags arguments

`

The command is what to do. Flags modify how, and conventionally start with a dash. Arguments are what to do it to.

The same command, three shapes

TYPED

ls

ls -l

ls -l projects

MEANS

just list this directory

list it in long form

list projects in long form
Compare → Flags stack, so ls -l -a can be written ls -la. That shorthand is why real terminal sessions look dense: rm -rf is simply the r and f flags written together.

When you do not know, ask the machine. Every real command ships with its own documentation, and reaching for it is a professional habit rather than an admission of ignorance.

man ls opens the manual for ls.

which ls shows which program would actually run.

help lists what this sandbox supports.

SANKOFA SANDBOX
learner:~$

The manual pages here are short summaries. On a real machine `man` opens a full document you scroll with arrow keys and leave by pressing q.

Try it → Run `man ls`, then `ls -l`, then `ls -la`. Compare the three outputs and work out what each flag added.

✦ Nothing happened is usually success

Many commands print absolutely nothing when they work. That is deliberate: output is reserved for information you asked for or problems you need to know about. Silence followed by a fresh prompt means it worked. This trips up nearly everyone at first, because a graphical interface would have shown a confirmation.

◈ Graded Task

Orient yourself in the sandbox. Find out which directory you are in, look at what is inside it including the hidden entries, and read the manual page for the command that changes directory.

Checked against the filesystem you leave behind, not the commands you type, so any route that gets the job done counts. 3 visible and 2 hidden checks.

SANKOFA SANDBOX
learner:~$

Mark this lesson complete

Signed in, your progress follows you to every device.

Next: Practice Test →
← Back