ShareYourGroupShareYourGroupCommands

Commands for Windows, Linux and Mac, explained safely

What each command does, how to use it, and what it prints, shown with real output from a practice folder. Commands that delete or overwrite carry a clear warning. Free, no login.

Windows commands

Linux and Mac commands

Guides

How to use this site

Look up a command. Type its name in the box above, or the job you want done: "copy", "find text", "delete", "ip address". Each page covers one command or a small family that belongs together.

Start from the beginning. If you have never opened a command line, read Getting started first. It shows how to open the terminal on each system, how a command is built, and the first ten commands to try in a practice folder.

Check before you paste. If you have found a command on the internet and are not sure about it, read Dangerous commands. It lists the patterns that delete, overwrite, or download and run something, so that you can recognise them.

What is on each page

  1. What the command is for, in a sentence or two.
  2. Examples, starting with the simplest, each with the output it produced.
  3. A table of its useful options.
  4. Warnings, in a marked box, wherever a form of the command can destroy data.
  5. Common mistakes and the error messages they cause.
  6. The matching command on the other system.

The examples are real

Most pages that explain commands invent their sample output. Here, a script ran each example in a small practice folder, on Windows in the Command Prompt and with the standard Linux tools, and the pages show what came back, errors included. Only the folder path and the user name were changed, to made-up ones.

Some commands were deliberately not run: those that would reveal a real network or computer, those that affect the whole system, and those that destroy data. They are shown as you would type them, marked "not run here", and any output beside them is labelled as an illustration.

Two families of commands

Windows has the Command Prompt, with commands such as dir, copy and del, and the newer PowerShell. The Windows pages here use the Command Prompt. The guide to PowerShell shows how the two relate.

Linux and the Mac share a family that comes from Unix: ls, cp, rm, grep. One set of pages covers both, with a note wherever the Mac differs.

The page Windows and Linux commands side by side translates between the two.

A promise about safety

The command line does what it is told, immediately, and mostly without asking. That is its strength and its danger. Every page here follows three rules.

Questions people ask

Is the command line hard?

It is unfamiliar more than hard. Ten commands cover most everyday needs, and each one does a single clear thing.

Can I damage my computer?

Looking, listing and reading cannot hurt anything. Deleting and overwriting can, which is why those commands are marked. Working in a practice folder while you learn removes the risk.

Do I need to be an administrator?

No. Ordinary commands work in an ordinary account. Be cautious of any instruction that insists on administrator rights or sudo for a simple job.

Which should I learn, Command Prompt or PowerShell?

Start with whichever your instructions use. The ideas carry over.

This is an independent learning site. It is not connected with Microsoft, Apple or any Linux distribution. Windows, macOS and other names belong to their owners. Try commands first in a practice folder, never on files you cannot afford to lose.