Commands and Environment Variables

Commands

Commands are programs that you run in the terminal. Instead of double-clicking an icon or selecting an entry in the Start menu — things you can still do on Linux — running commands gives you a more powerful, direct view of what’s going on behind the scenes.

Linux, being somewhat like MS-DOS in its structure, has the terminal at its core. Much of its functionality was built around it, and many tools still use it as their main interface.

Commands (programs) are straightforward. The main difference from Windows is that they’re not defined by extensions (like .exe) but by having an execute flag. So a typical executable on Linux doesn’t need an extension at all — a file simply called game or flatpak is enough to run.

Subcommands, arguments, and flags

Most commands follow this pattern:

{command} {subcommand} {-argument} {--flag}

Subcommands

Subcommands (sometimes called verbs) are like small subroutines that a command can perform.

For example:

flatpak update
dnf upgrade

Here, update and upgrade are subcommands that tell the program what to do.
If I want to install a Flatpak app, I’d use the install subcommand:

flatpak install org.mozilla.firefox

This simply installs Firefox as a Flatpak.

Arguments

Arguments modify how a command behaves or what it displays. For instance:

ls -l

The -l argument tells ls to list files in a detailed view, one per line.

Flags (or options)

Flags are similar but typically use two dashes and are often more descriptive:

dnf upgrade --refresh

This tells DNF to refresh the software repositories before upgrading, so I get the latest available updates right away.

Arguments and flags can also have values, either separated by a space or with an equals sign:

--verbosity=1
--max-depth 1

And when several single-letter arguments are used, they can be collapsed together.
Instead of writing:

tar -z -c -v -f

you can combine them:

tar -zcvf

Environment variables

Another mechanism that affects how programs run is environment variables.
These are simple key-value pairs defined in your system and read by programs at startup.

Windows has them too — like PATH or TMP.
PATH is a colon-separated list of directories where the OS looks for executables. It’s populated by default, but you can modify it temporarily:

PATH=/home/john/fun-commands/

Now, for the rest of your session, you’ll be able to run commands from that folder no matter where you are.

If you’ve ever browsed ProtonDB, you’ve probably seen examples like:

__NV_PRIME_RENDER_OFFLOAD=1
__GLX_VENDOR_LIBRARY_NAME=nvidia

These variables change how specific programs (in this case, games or GPU drivers) behave.

Wrapping up

Understanding how commands, arguments, and environment variables work helps you peek “under the hood” and interact with Linux at a deeper level.
While many modern Linux tools now have graphical interfaces, these fundamentals remain part of its DNA — giving users the ability to investigate, tweak, and fix things on their own.

In contrast, on Windows, when a program crashes, that’s usually it — you restart it and hope for an update.
On Linux, we tend to dig in and see why something went wrong. It’s part of the culture: curiosity, control, and understanding your tools.