The `duckdb` shell either is not on your PATH, was blocked by the OS after download, or is the wrong architecture for your machine. In all three cases the binary is on disk but your terminal cannot execute it.
The exact wording depends on your shell and OS, but the substance is one of the following. All of these mean the shell either cannot find the `duckdb` binary or is being prevented from executing it.
# Fresh shell after install, PATH not picked up yet:
zsh: command not found: duckdb
bash: duckdb: command not found
# macOS Gatekeeper on a directly downloaded binary:
"duckdb" cannot be opened because the developer cannot be verified.
"duckdb" is damaged and can't be opened. You should move it to the Trash.
# Wrong architecture on macOS:
zsh: bad CPU type in executable: duckdb
# Wrong architecture / corrupt download on Linux:
bash: ./duckdb: cannot execute binary file: Exec format error
# Older Linux distro, glibc too old:
./duckdb: /lib/x86_64-linux-gnu/libc.so.6: version 'GLIBC_2.32' not found (required by ./duckdb)
# Windows PowerShell after install without a new session:
duckdb : The term 'duckdb' is not recognized as the name of a cmdlet, function, script file, or operable program.duckdb command not found, zsh command not found duckdb, duckdb bad cpu type in executable, duckdb cannot be opened because the developer cannot be verified, duckdb glibc not found, duckdb not recognizedRanked most-likely first.
`curl https://install.duckdb.org | sh` writes the binary to `~/.duckdb/cli/latest/duckdb` and appends an export line to `~/.zshrc` or `~/.bashrc`. Existing terminal sessions still hold the old PATH, so `duckdb` resolves to nothing until you open a new shell or source the rc file.
Any executable downloaded through a browser or curl gets a `com.apple.quarantine` extended attribute. When you try to run it, Gatekeeper refuses because the DuckDB CLI is not notarized. The install script handles this for you, but a manual ZIP download from GitHub Releases does not.
Apple Silicon Macs need the `arm64` build; older Intel Macs need `amd64`. Linux distinguishes `amd64` and `arm64` the same way. Running the wrong one produces `bad CPU type in executable` on macOS or `Exec format error` on Linux. This is a common failure mode when a script targets the wrong platform variable.
DuckDB's Linux release is dynamically linked against a recent glibc. Distros with glibc older than what the release was built against (older CentOS 7, Amazon Linux 2, minimal container base images) will refuse to start the binary with a `version 'GLIBC_X.Y' not found` error.
`brew install duckdb` places the binary at `/opt/homebrew/bin/duckdb` on Apple Silicon or `/usr/local/bin/duckdb` on Intel. If you installed Homebrew but skipped its shell setup, neither location is on PATH and `duckdb` resolves to nothing even though the install succeeded.
The Windows installer and `winget install DuckDB.cli` both add the binary directory to the user's PATH, but Windows only pushes that change to processes started after the modification. PowerShell and cmd sessions that were open at install time will still say `not recognized`.
Before touching anything, confirm what the shell actually finds. This tells you whether the problem is a PATH issue, a permission issue, or a missing binary.
# macOS / Linux:
which duckdb
type -a duckdb
ls -l ~/.duckdb/cli/latest/duckdb
# Windows PowerShell:
where.exe duckdb
Get-Command duckdbThe most common cause. The installer wrote the PATH export to your shell rc file, but your current session still has the old environment. Open a new terminal or source the file directly.
# zsh:
source ~/.zshrc
# bash:
source ~/.bashrc
# fish:
source ~/.config/fish/config.fish
# Verify PATH now includes the DuckDB install directory:
echo $PATH | tr ':' '\n' | grep duckdbIf the installer skipped the PATH edit (some setups block it), add the line yourself. The install.duckdb.org script places binaries at `~/.duckdb/cli/latest/duckdb`.
# Append to your shell rc file:
echo 'export PATH="$HOME/.duckdb/cli/latest:$PATH"' >> ~/.zshrc
source ~/.zshrc
# Confirm it resolves:
which duckdb
duckdb --versionIf Gatekeeper is blocking a directly downloaded binary, remove the quarantine flag. Do this only for binaries you trust and downloaded yourself from duckdb.org or the official GitHub release page.
# Check whether the flag is set:
xattr ./duckdb
# Remove it:
xattr -d com.apple.quarantine ./duckdb
# Or clear all extended attributes:
xattr -c ./duckdb
# Confirm the binary runs:
./duckdb --versionCheck your CPU architecture and re-download the matching binary. The DuckDB release page publishes separate builds for `osx-universal`, `linux-amd64`, `linux-arm64`, `windows-amd64`, and `windows-arm64`.
# macOS, find your arch:
uname -m
# arm64 = Apple Silicon, x86_64 = Intel
# Linux, find your arch:
uname -m
# aarch64 = arm64, x86_64 = amd64
# Then re-run the installer, which picks the right build:
curl https://install.duckdb.org | shYou cannot upgrade glibc in place without rebuilding the OS. Either move to a newer distro (Ubuntu 22.04+, Debian 12+, RHEL 9+), run DuckDB inside a container, or build from source against the older glibc.
# Check your glibc version:
ldd --version | head -1
# Run DuckDB in the official container instead:
docker run --rm -it -v "$(pwd):/workspace" -w /workspace duckdb/duckdb
# Or build from source (requires cmake + a C++ compiler):
git clone https://github.com/duckdb/duckdb.git
cd duckdb
GEN=ninja makeIf you installed via Homebrew but skipped `brew shellenv`, PATH will not include Homebrew's bin directory. Run the setup line for your shell.
# Apple Silicon:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zshrc
eval "$(/opt/homebrew/bin/brew shellenv)"
# Intel Mac:
echo 'eval "$(/usr/local/bin/brew shellenv)"' >> ~/.zshrc
eval "$(/usr/local/bin/brew shellenv)"
# Verify:
which duckdbPowerShell and cmd inherit PATH at process start. After `winget install DuckDB.cli` or the PowerShell installer, close every open terminal window and open a new one. If it still fails, refresh the environment in the current session.
# In PowerShell, refresh PATH without restarting:
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
# Confirm:
Get-Command duckdb
duckdb --versionFor scripted or CI installs, don't rely on the interactive installer's PATH edit. Pin an absolute path to the binary (`~/.duckdb/cli/latest/duckdb` or a versioned equivalent) or copy it into `/usr/local/bin` yourself so PATH is never in question.
In Dockerfiles and containers, use the official `duckdb/duckdb` image or install by downloading the release ZIP into a known location. That way glibc and architecture are pinned together and cannot drift.
On macOS, prefer `brew install duckdb` over a manual download. Homebrew handles quarantine, PATH, and updates so you never have to think about Gatekeeper or PATH refresh timing.
1bench is a native GUI for DuckDB. Inspect queries, connections, and settings without leaving the app. See what's happening before you have to Google it.
Open DuckDB in 1bench