Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Antihost offers VPS plans with one-click Docker, NVMe storage and a 14-day free trial.
If Linux prints docker: 'compose' is not a docker command, the Docker CLI is running but cannot find its Compose V2 plugin. Install the docker-compose-plugin package from Docker’s official repository, then confirm it with docker compose version. On systems where packages are unavailable, install the Compose V2 binary in a Docker CLI-plugin directory and make it executable.
The space in docker compose matters: it invokes a CLI plugin. The older hyphenated command, docker-compose, is a separate standalone program and does not prove that the V2 plugin is installed.
Recommended Free Tools
What the error actually means
Docker Engine and the Docker command-line client can be installed successfully while Compose is missing. Compose V2 is distributed as a Docker CLI plugin. When you type docker compose, the Docker client looks for a plugin named docker-compose in its supported plugin directories. If no usable plugin is found, the client treats compose as an unknown subcommand and prints the error.
This is usually a packaging or plugin-discovery problem, not a stopped container, a bad Compose file, or a failure of the Docker daemon. Installing or restarting containers will not add the missing command. The fix is to install the plugin and place it where the Docker CLI searches.
#1 Best Overall
Why Docker may be installed without Compose
Linux distributions and installation methods can separate the Docker Engine packages from optional CLI extensions. A convenience-script installation can leave the Engine available while Compose is absent; a reported issue in the Docker Compose tracker describes docker compose continuing to fail after such an installation. A distribution upgrade or a repository configured for the wrong release codename can produce the same symptom when the plugin package is no longer available to apt.
What this error does not indicate
- It does not mean that your
compose.yamlordocker-compose.ymlfile has invalid syntax. The command fails before Docker reads a Compose file. - It does not normally require changing Docker daemon settings.
- It is not fixed by enabling the old
experimentalsetting in/etc/docker/daemon.json. - Homebrew-based instructions are for macOS and are not a Linux solution.
Quick diagnosis before changing anything
Run the command exactly as written, with a space:
docker compose version
If the plugin is present, Docker prints a Compose V2 version beginning with v2.. If you receive the same unknown-command message, continue with the installation method for your distribution.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCheck which command your scripts use
Search your shell commands, service files, and deployment scripts for both spellings. docker compose is the V2 plugin interface. docker-compose calls the older standalone V1 executable. Installing one does not automatically create the other, and changing a script from one spelling to the other can change its behavior. Standardize on the command your environment is intended to use instead of assuming that a working hyphenated command means the plugin is available.
Confirm your distribution family
Use your normal package-management tools and repository configuration for the Linux release. Debian and Ubuntu use apt; Fedora, RHEL, and CentOS commonly use dnf or yum. The package name in the Docker repository is docker-compose-plugin.
Debian or Ubuntu: install the Compose plugin with apt
The package-manager route is the preferred fix on Debian and Ubuntu because package updates can maintain the plugin along with the rest of the Docker installation.
Step 1: verify Docker’s official apt repository
Before installing, make sure Docker’s official apt repository is configured for the exact release you are running. A repository entry using a different Ubuntu or Debian codename can leave the Engine installed while making the Compose package unavailable. If apt reports that it cannot locate docker-compose-plugin, treat repository configuration as the first problem to solve rather than downloading a random binary.
Check the repository definition, distribution codename, architecture, and signing-key setup using the same procedure you used to install Docker. The repository must be enabled for your current release, not merely present for an older release that happens to share the machine.
Step 2: refresh package metadata
sudo apt-get update
This downloads the current package indexes. Read any errors in the output: an unreachable repository, an invalid signature, or a release-codename mismatch can prevent apt from seeing the plugin package.
Step 3: install the plugin
sudo apt-get install docker-compose-plugin
Accept the package transaction when apt shows the expected Docker repository package. The installation registers the Compose V2 CLI plugin; it does not require you to edit the Docker daemon configuration.
Step 4: verify the result
docker compose version
A successful installation prints a Compose V2 version. If it still prints the unknown-command error, return to the repository and plugin-location checks below rather than installing the V1 hyphenated command as a substitute.
Free tools Windows power users keep installed
One-click scans. No signup required.
If apt cannot find the package
The usual causes are a missing Docker repository, a repository configured for the wrong codename, or stale package indexes. Correct the official repository configuration for your release, run sudo apt-get update again, and retry the package installation. Do not infer from a successful docker --version that every Docker component is available: Engine and Compose are separate packages.
Fedora, RHEL, or CentOS: install with dnf or yum
On RPM-based systems, first enable Docker’s repository for the distribution and release. Then install the same plugin package with the package manager provided by your system.
Using dnf
sudo dnf install docker-compose-plugin
Using yum
sudo yum install docker-compose-plugin
After the transaction completes, verify the command:
docker compose version
If the package manager cannot locate the package, check that Docker’s repository is enabled and matches the installed release. Repository setup and package naming can vary across RPM-family releases, so use the Docker repository configuration appropriate for your specific Fedora, RHEL, or CentOS version instead of mixing instructions from another distribution.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Manual installation when packages are unavailable
A manual installation is a fallback for systems that cannot use the Docker package repositories. Obtain the Compose V2 binary from a trusted Docker distribution source, then install it under the exact filename and directory expected by the CLI.
Per-user installation
The per-user plugin path is:
~/.docker/cli-plugins/docker-compose
This keeps the plugin available to one Linux user and avoids modifying a system directory. Create the directory if it does not exist, copy the binary to that path, and make it executable:
mkdir -p ~/.docker/cli-plugins
chmod +x ~/.docker/cli-plugins/docker-compose
The filename must be docker-compose; adding an extension or leaving the file in the parent ~/.docker directory prevents discovery.
System-wide installation
For all users, use:
/usr/local/lib/docker/cli-plugins/docker-compose
Because this is a protected system location, create the directory and copy the binary with administrator privileges, then set its executable bit:
sudo mkdir -p /usr/local/lib/docker/cli-plugins
sudo chmod +x /usr/local/lib/docker/cli-plugins/docker-compose
Ensure the copied file itself is owned and readable in the way your local security policy requires. A system-wide plugin is useful on shared hosts, but it also becomes your responsibility to replace it when a newer Compose V2 release is needed.
Manual-install trade-offs
The binary method bypasses package repositories, so upgrades are manual. You must track new Compose V2 releases, replace the binary deliberately, preserve the exact path and filename, and repeat the executable-permission step when necessary. Package installation is normally safer for routine maintenance because the package manager supplies update metadata and handles replacement.
Verify plugin discovery and isolate remaining failures
Always finish with:
docker compose version
Use the result to choose the next branch.
A V2 version is printed
The CLI can see the plugin. Compose command discovery is fixed; any subsequent error concerns a Compose project, service definition, environment variable, or container operation rather than the original missing-command problem.
The unknown-command message remains after apt or dnf installation
- Confirm that the package installation completed without repository or dependency errors.
- Check that the plugin was installed for the same Docker CLI binary you are invoking. Multiple Docker installations can place clients and plugins in different locations.
- Check the two supported plugin locations:
~/.docker/cli-plugins/docker-composefor one user and/usr/local/lib/docker/cli-plugins/docker-composesystem-wide. - For a manually copied file, confirm the exact filename and executable permission.
- Run the verification command as the same user who will run Compose. A per-user plugin is not automatically visible to another account or to a service running under a different account.
The package is installed but a script still fails
Inspect the script’s command spelling. A script that calls docker-compose is requesting the standalone hyphenated executable, while your successful check of docker compose version proves only that the V2 plugin works. Update the script to the intended interface or install the separate executable only when compatibility with that script requires it.
The command works for one user but not another
This usually reflects plugin scope. A file under ~/.docker/cli-plugins belongs to one home directory. Install it for each required user or move to the system-wide directory, then repeat the version check under each account that will run Compose.
docker compose versus docker-compose
| Command | What it invokes | Where the executable comes from | What a successful check looks like |
|---|---|---|---|
docker compose |
Compose V2 as a Docker CLI plugin | The docker-compose-plugin package or a binary in a Docker CLI-plugin directory |
docker compose version prints a V2 version |
docker-compose |
The standalone hyphenated Compose V1 command | A separate executable installed independently | A command using the hyphenated name runs |
The two names are not interchangeable aliases. If documentation or automation uses one spelling, install and test that spelling. For new Linux setups targeting Compose V2, the space-separated command is the one this error concerns.
Best Value
Choose the right installation path
| Approach | Best fit | Installation location | Maintenance |
|---|---|---|---|
| Docker package repository | Debian, Ubuntu, Fedora, RHEL, or CentOS systems that can use Docker’s repository | Managed by the distribution package installation | Preferred because updates are handled through the package manager |
| Per-user manual plugin | A single user or a host where system directories cannot be changed | ~/.docker/cli-plugins/docker-compose |
Manual upgrades; applies to that user |
| System-wide manual plugin | Shared hosts where several users need the same plugin | /usr/local/lib/docker/cli-plugins/docker-compose |
Manual upgrades; administrator maintains one shared binary |
Use one method consistently. Mixing a package-managed plugin with an unrelated manually copied binary can make troubleshooting confusing because different users or Docker clients may discover different files.
Common wrong turns
Changing /etc/docker/daemon.json
Advice to set "experimental": true is not the fix for a missing Compose CLI subcommand. The error is generated by the client before it can run a Compose operation, so daemon feature flags do not register the plugin.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsInstalling a macOS Homebrew workaround on Linux
Homebrew-based Compose instructions target macOS. They do not configure the Linux Docker CLI plugin directories described above. Follow the package-manager or manual Linux paths instead.
Assuming a convenience script installed everything
A convenience script can install Docker components without leaving Compose V2 available. Test the plugin explicitly with docker compose version after any automated installation and install docker-compose-plugin if it is missing.
Using the wrong repository release
An apt or RPM repository entry for another release may still provide some Docker packages while omitting the Compose plugin or preventing metadata refresh. Align the repository with the machine’s actual distribution and codename before retrying.
Complete recovery checklist
- Run
docker compose versionand confirm that the failure is the unknowncomposesubcommand. - Identify whether the host uses Debian/Ubuntu apt or Fedora/RHEL/CentOS dnf or yum.
- Verify Docker’s official repository is enabled for the installed release.
- Install
docker-compose-pluginwith the matching package manager. - If packages are unavailable, place the Compose V2 binary at a supported per-user or system-wide CLI-plugin path.
- Make the binary executable with
chmod +x. - Run
docker compose versionas the same user and in the same environment that will run your project. - If automation still fails, correct its command spelling:
docker composeanddocker-composerequest different programs.
Once the version command returns a V2 release, the specific “compose is not a docker command” problem is resolved. Further Compose errors should be investigated as project or runtime issues, not as plugin registration failures.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

