{
    "url": "https://delaparra-services.nl/knowledge-hub/which",
    "locale": "en",
    "title": "which: Knowledge hub | DeLaParra Services",
    "description": "Which — Show the full path of a command executable.",
    "alternates": {
        "en": "https://delaparra-services.nl/knowledge-hub/which",
        "nl": "https://delaparra-services.nl/nl/kennisbank/which"
    },
    "formats": {
        "csv": "https://delaparra-services.nl/knowledge-hub/which.csv",
        "md": "https://delaparra-services.nl/knowledge-hub/which.md",
        "json": "https://delaparra-services.nl/knowledge-hub/which.json",
        "zip": "https://delaparra-services.nl/knowledge-hub/which.zip",
        "pdf": "https://delaparra-services.nl/knowledge-hub/which.pdf"
    },
    "downloads": [
        {
            "url": "https://delaparra-services.nl/knowledge-hub/which.csv",
            "encodingFormat": "text/csv",
            "name": "which.csv"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/which.json",
            "encodingFormat": "application/json",
            "name": "which.json"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/which.md",
            "encodingFormat": "text/markdown",
            "name": "which.md"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/which.pdf",
            "encodingFormat": "application/pdf",
            "name": "which.pdf"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/which.zip",
            "encodingFormat": "application/zip",
            "name": "which.zip"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/which/skills.zip",
            "encodingFormat": "application/zip",
            "name": "which-skills.zip"
        }
    ],
    "markdown": "1. [Home](<https://delaparra-services.nl/>) \n1. [Knowledge hub](<https://delaparra-services.nl/knowledge-hub>) \n1. [which](<https://delaparra-services.nl/knowledge-hub/which>)\n\n  \n\nCategory: CLI commands \n\n# which\n\n  Explained by [Reinier de la Parra](<https://delaparra-services.nl/about>)  Updated November 25, 2026    \n\n## What is which?\n\n \n\nwhich: Which — Show the full path of a command executable. ` which ` shows the full path of the program that runs when you type a command. ` which php ` might return ` /usr/bin/php ` or ` /opt/homebrew/bin/php `. That helps when several versions are installed, which is common with PHP, Node and Python. If ` php -v ` shows a different version than you expect, ` which php ` tells you which one your shell actually finds first on the ` PATH `.\n\n \n\nDefinition source [Coders Lingo](<https://coderslingo.com/resources/open-dataset/>), [CC BY 4.0](<https://creativecommons.org/licenses/by/4.0/>)\n\n \n\n## Frequently asked questions about which\n\n  \n\n### What should you keep in mind with which?\n\n \n\n` which -a php ` lists every match, in the order they are searched. ` type php ` in Bash also reports aliases and shell functions, which ` which ` may miss. If the wrong version is picked up, adjust the order of folders in your ` PATH `, or use a version manager like nvm, phpbrew or asdf, which switch versions per project.\n\n \n\n## At a glance\n\n   CategoryCLI commands Explained by[Reinier de la Parra](<https://delaparra-services.nl/about>) UpdatedNovember 25, 2026\n\n \n\n## More CLI commands terms\n\n \n\n- [sudo](<https://delaparra-services.nl/knowledge-hub/sudo>) \n- [tail](<https://delaparra-services.nl/knowledge-hub/tail>) \n- [tar](<https://delaparra-services.nl/knowledge-hub/tar>) \n- [top / htop](<https://delaparra-services.nl/knowledge-hub/top-htop>) \n- [wget](<https://delaparra-services.nl/knowledge-hub/wget>) \n- [zip / unzip](<https://delaparra-services.nl/knowledge-hub/zip-unzip>)\n\n \n\n[All terms starting with W](<https://delaparra-services.nl/knowledge-hub#letter-w>)\n\n \n\n## Skills\n\n \n\n- ### CLI flag safety\n\n \n\nUse before running or suggesting shell commands with flags, especially destructive or broad ones (-f/--force, -r/-R recursive, -a/--all, -y/--yes, prune, --hard), and when a user asks what a flag means (-v, -q, -n/--dry-run, -h, -o, -p, -t, -u, -w, -x, -c, -i). Explains flags per tool and prefers dry runs and narrow scopes.\n\n [View skill](<https://delaparra-services.nl/skills/cli-flag-safety>) [Download zip](<https://delaparra-services.nl/skills/cli-flag-safety/download>) \n- ### Bash Defensive Patterns\n\n \n\nMaster defensive Bash programming techniques for production-grade scripts. Use when writing robust shell scripts, CI/CD pipelines, or system utilities requiring fault tolerance and safety.\n\n [View skill](<https://delaparra-services.nl/skills/bash-defensive-patterns>) [Download zip](<https://delaparra-services.nl/skills/bash-defensive-patterns/download>) \n- ### Debian Linux Triage\n\n \n\n'Triage and resolve Debian Linux issues with apt, systemd, and AppArmor-aware guidance.'\n\n [View skill](<https://delaparra-services.nl/skills/debian-linux-triage>) [Download zip](<https://delaparra-services.nl/skills/debian-linux-triage/download>)\n\n [Download all skills (zip)](<https://delaparra-services.nl/knowledge-hub/which/skills.zip>)\n\n \n\n## Manuals\n\n \n\n- [The terminal commands you actually need](<https://delaparra-services.nl/manuals/terminalcommandos-die-je-nodig-hebt>) \n- [The terminal and PowerShell](<https://delaparra-services.nl/manuals/de-terminal-en-powershell>)\n\n \n\n## Related services\n\n \n\n- [Your own coding agent](<https://delaparra-services.nl/services#service-06>)\n\nIf you want to use a coding agent, we provide all the infrastructure to help it work efficiently.\n\n \n\n## Need any help?\n\n \n\nStuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.\n\n  [Get in touch](<https://delaparra-services.nl/availability>)\n\n[HTML version](https://delaparra-services.nl/knowledge-hub/which)\n",
    "structured_data": {
        "@context": "https://schema.org",
        "@graph": [
            {
                "@type": "Organization",
                "@id": "https://delaparra-services.nl/#practice",
                "logo": "https://delaparra-services.nl/logo.png",
                "name": "DeLaParra Services",
                "legalName": "DeLaParra Services",
                "url": "https://delaparra-services.nl/",
                "description": "Bespoke software, web applications and mobile apps, developed in Laravel by a single developer in Groningen. Fixed price agreed in advance, full source code provided upon delivery.",
                "email": "info@delaparra-services.nl",
                "address": {
                    "@type": "PostalAddress",
                    "addressLocality": "Groningen",
                    "addressRegion": "Groningen",
                    "addressCountry": "NL"
                },
                "areaServed": "Groningen, the Netherlands",
                "knowsLanguage": [
                    "en",
                    "nl"
                ],
                "knowsAbout": [
                    "Web design and development",
                    "App development",
                    "Custom software and web applications",
                    "OpenSpec",
                    "AI code review",
                    "Your own coding agent"
                ],
                "founder": {
                    "@id": "https://delaparra-services.nl/#person"
                }
            },
            {
                "@type": "FAQPage",
                "@id": "https://delaparra-services.nl/knowledge-hub/which#webpage",
                "url": "https://delaparra-services.nl/knowledge-hub/which",
                "name": "which: Knowledge hub | DeLaParra Services",
                "description": "Which — Show the full path of a command executable.",
                "isPartOf": {
                    "@id": "https://delaparra-services.nl/#website"
                },
                "about": {
                    "@type": "DefinedTerm",
                    "@id": "https://delaparra-services.nl/knowledge-hub/which#term",
                    "name": "which",
                    "description": "Which — Show the full path of a command executable.",
                    "termCode": "which",
                    "url": "https://delaparra-services.nl/knowledge-hub/which",
                    "inLanguage": "en",
                    "keywords": "CLI commands",
                    "dateModified": "2026-11-25T17:46:31+00:00",
                    "inDefinedTermSet": {
                        "@id": "https://delaparra-services.nl/knowledge-hub#terms"
                    },
                    "isPartOf": {
                        "@id": "https://delaparra-services.nl/knowledge-hub#dataset"
                    },
                    "subjectOf": [
                        {
                            "@id": "https://delaparra-services.nl/knowledge-hub/which#webpage"
                        },
                        {
                            "@id": "https://delaparra-services.nl/knowledge-hub/which#dataset"
                        }
                    ]
                },
                "inLanguage": "en",
                "breadcrumb": {
                    "@id": "https://delaparra-services.nl/knowledge-hub/which#breadcrumb"
                },
                "mainEntity": [
                    {
                        "@type": "Question",
                        "name": "What is which?",
                        "acceptedAnswer": {
                            "@type": "Answer",
                            "text": "Which — Show the full path of a command executable. which shows the full path of the program that runs when you type a command. which php might return /usr/bin/php or /opt/homebrew/bin/php. That helps when several versions are installed, which is common with PHP, Node and Python. If php -v shows a different version than you expect, which php tells you which one your shell actually finds first on the PATH."
                        }
                    },
                    {
                        "@type": "Question",
                        "name": "What should you keep in mind with which?",
                        "acceptedAnswer": {
                            "@type": "Answer",
                            "text": "which -a php lists every match, in the order they are searched. type php in Bash also reports aliases and shell functions, which which may miss. If the wrong version is picked up, adjust the order of folders in your PATH, or use a version manager like nvm, phpbrew or asdf, which switch versions per project."
                        }
                    }
                ],
                "author": {
                    "@id": "https://delaparra-services.nl/#person"
                },
                "mentions": [
                    {
                        "@id": "https://delaparra-services.nl/skills/cli-flag-safety#skill"
                    },
                    {
                        "@id": "https://delaparra-services.nl/skills/bash-defensive-patterns#skill"
                    },
                    {
                        "@id": "https://delaparra-services.nl/skills/debian-linux-triage#skill"
                    },
                    {
                        "@id": "https://delaparra-services.nl/manuals/terminalcommandos-die-je-nodig-hebt#article"
                    },
                    {
                        "@id": "https://delaparra-services.nl/manuals/de-terminal-en-powershell#article"
                    }
                ]
            },
            {
                "@type": "BreadcrumbList",
                "@id": "https://delaparra-services.nl/knowledge-hub/which#breadcrumb",
                "itemListElement": [
                    {
                        "@type": "ListItem",
                        "position": 1,
                        "name": "Home",
                        "item": "https://delaparra-services.nl/"
                    },
                    {
                        "@type": "ListItem",
                        "position": 2,
                        "name": "Knowledge hub",
                        "item": "https://delaparra-services.nl/knowledge-hub"
                    },
                    {
                        "@type": "ListItem",
                        "position": 3,
                        "name": "which"
                    }
                ]
            },
            {
                "@type": "Person",
                "@id": "https://delaparra-services.nl/#person",
                "name": "Reinier de la Parra",
                "url": "https://delaparra-services.nl/about"
            },
            {
                "@type": "Dataset",
                "@id": "https://delaparra-services.nl/knowledge-hub/which#dataset",
                "name": "which",
                "description": "Which — Show the full path of a command executable.",
                "url": "https://delaparra-services.nl/knowledge-hub/which",
                "identifier": "https://delaparra-services.nl/knowledge-hub/which#dataset",
                "about": {
                    "@id": "https://delaparra-services.nl/knowledge-hub/which#term"
                },
                "creator": {
                    "@id": "https://delaparra-services.nl/#practice"
                },
                "publisher": {
                    "@id": "https://delaparra-services.nl/#practice"
                },
                "license": "https://creativecommons.org/licenses/by/4.0/",
                "creditText": "Coders Lingo (https://coderslingo.com/resources/open-dataset/), CC BY 4.0",
                "isAccessibleForFree": true,
                "inLanguage": "en",
                "keywords": "CLI commands",
                "version": "2026-11-25",
                "dateModified": "2026-11-25T17:46:31+00:00",
                "isPartOf": {
                    "@type": "Dataset",
                    "@id": "https://delaparra-services.nl/knowledge-hub#dataset",
                    "name": "IT terms from A to Z",
                    "url": "https://delaparra-services.nl/knowledge-hub"
                },
                "includedInDataCatalog": {
                    "@type": "DataCatalog",
                    "@id": "https://delaparra-services.nl/knowledge-hub#catalog",
                    "name": "Knowledge hub data catalog",
                    "url": "https://delaparra-services.nl/knowledge-hub"
                },
                "distribution": [
                    {
                        "@type": "DataDownload",
                        "name": "which.csv",
                        "encodingFormat": "text/csv",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/which.csv",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:31+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "which.json",
                        "encodingFormat": "application/json",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/which.json",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:31+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "which.md",
                        "encodingFormat": "text/markdown",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/which.md",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:31+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "which.pdf",
                        "encodingFormat": "application/pdf",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/which.pdf",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:31+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "which.zip",
                        "encodingFormat": "application/zip",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/which.zip",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:31+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "which-skills.zip",
                        "encodingFormat": "application/zip",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/which/skills.zip",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:31+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    }
                ]
            }
        ]
    }
}