Flags vs Options

Flags vs Options

February 8, 2026·Abid
Abid

Flags

Flags are work like boolean value. By adding a flag, a feature is enabled or disabled.

Flags don’t take any value, Flags Usually a single letter

Like -a flag with ls command lists all files & directories including hidden ones. -a enables the feature of listing hidden files & directories.

Options

Basically options are long (can be short sometime). Generally Options take a value & change the behaviour of command according to the value.

Option takes a value, Option Usually long form

fzf --preview='cat {}'

The --preview option take cat as value and change behaviour accordingly.

Last updated on