{
  "schema_version": 2,
  "id": "develop/reference/errors/common/err-unknown-command",
  "title": "ERR unknown command",
  "url": "https://redis.io/docs/latest/develop/reference/errors/common/err-unknown-command/",
  "summary": "The server doesn't recognize the command name.",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-11-02T15:10:28+01:00",
  "page_type": "content",
  "content_hash": "43161a2ad0d7bdd825ee27efaca80f07b7161c5e3f3eda280e07c089f48a2183",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Redis returns this error when it doesn't recognize the command you sent. The message repeats the command name and its first arguments, so you can see exactly what the server received. For a command without arguments, the message ends after the command name: `ERR unknown command 'FOO'`.\n\n[code example]"
    },
    {
      "id": "example",
      "title": "Example",
      "role": "example",
      "text": "[code example]\n\nA command that has subcommands, such as `CONFIG`, gives a similar error for a subcommand it doesn't know:\n\n[code example]"
    },
    {
      "id": "how-to-fix-it",
      "title": "How to fix it",
      "role": "content",
      "text": "- **The command name is misspelled.** Check the name on the command's page, such as [`GET`](https://redis.io/docs/latest/commands/get).\n- **The command is newer than your server.** Each command page shows the version that added the command, under **Available since**. To find your server's version, run [`INFO server`](https://redis.io/docs/latest/commands/info) and look at the `redis_version` field. Upgrade the server if you need the command.\n- **The command needs a feature that the server doesn't include.** For example, `JSON.SET` and `FT.SEARCH` only work when the server includes JSON and Redis Search. Some Redis builds and packages don't include them. To see which modules the server has loaded, run [`MODULE LIST`](https://redis.io/docs/latest/commands/module-list).\n- **The server's configuration renamed or disabled the command.** The `rename-command` setting can give a command a different name, or remove it. See [Disallowing specific commands](https://redis.io/docs/latest/operate/oss_and_stack/management/security#disallowing-specific-commands).\n\nIn a transaction, an unknown command also makes [`EXEC`](https://redis.io/docs/latest/commands/exec) fail with [`EXECABORT`](https://redis.io/docs/latest/develop/reference/errors/common/execabort)."
    }
  ],
  "examples": [
    {
      "id": "overview-ex0",
      "language": "plaintext",
      "code": "ERR unknown command 'FOO', with args beginning with: 'bar'",
      "section_id": "overview"
    },
    {
      "id": "example-ex0",
      "language": "plaintext",
      "code": "> FOO bar\n(error) ERR unknown command 'FOO', with args beginning with: 'bar'",
      "section_id": "example"
    },
    {
      "id": "example-ex1",
      "language": "plaintext",
      "code": "> CONFIG FOO\n(error) ERR unknown subcommand 'FOO'. Try CONFIG HELP.",
      "section_id": "example"
    }
  ]
}
