Skip to content
Programming contents

Lesson 2.2.3: Options and help

A command does more when you give it options. Which ones it has, its help tells you.

The idea

A command has three parts:

Linux · Bash
ls -a projects
  • ls: the command, what to do.
  • -a: an option, how to do it.
  • projects: the argument, what to do it with.

Options and the argument are optional. Without an argument, the command works in the folder you're in.

Options change

Here Linux and Windows part ways:

  • Linux: one letter with one dash (-a) or a word with two (--all).
  • Windows: a word with one dash (-Force).

An example: seeing hidden files, like the .git folder you'll meet in Git.

Linux · Bash
ls -a
Terminal
.  ..  .bash_history  .bashrc  .profile  projects
Windows · PowerShell
ls -Force
Terminal
    Directory: C:\Users\ana

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d--h--        10/20/2026      9:02                AppData
d-----        10/22/2026     10:15                projects

The h in d--h-- marks what's hidden. In PowerShell, ls -a is an error.

Help

Every command comes with its help:

  • Linux: man ls opens the manual. Arrows to move, q to quit. Shorter: ls --help.
  • Windows: help ls.

In PowerShell, ls is a nickname for Get-ChildItem. The help says so, and that's the name you'll find online.

Keys that save you

WhatLinuxWindows
Stop what's runningCtrl + CCtrl + C
CopyCtrl + Shift + CCtrl + C, with text selected
PasteCtrl + Shift + VCtrl + V
Clear the screenclearclear

On Linux, Ctrl + C doesn't copy: it stops the command.

Try it

Exercise

Look at the hidden files in your home folder. Then open the help for ls and leave it.

Show the solution
Linux · Bash
cd ~
ls -a
man ls

You leave the manual with q.

Windows · PowerShell
cd ~
ls -Force
help ls

Summary

  • A command: name, options and argument.
  • Options: -a or --all on Linux; -Force on Windows.
  • Help: man or --help on Linux, help on Windows.
  • Ctrl + C stops what's running. Copy and paste differ between the two.