{
    "url": "https://delaparra-services.nl/knowledge-hub/cd",
    "locale": "en",
    "title": "cd: Knowledge hub | DeLaParra Services",
    "description": "Change Directory — Navigate to a different directory.",
    "alternates": {
        "en": "https://delaparra-services.nl/knowledge-hub/cd",
        "nl": "https://delaparra-services.nl/nl/kennisbank/cd"
    },
    "formats": {
        "csv": "https://delaparra-services.nl/knowledge-hub/cd.csv",
        "md": "https://delaparra-services.nl/knowledge-hub/cd.md",
        "json": "https://delaparra-services.nl/knowledge-hub/cd.json",
        "zip": "https://delaparra-services.nl/knowledge-hub/cd.zip",
        "pdf": "https://delaparra-services.nl/knowledge-hub/cd.pdf"
    },
    "downloads": [
        {
            "url": "https://delaparra-services.nl/knowledge-hub/cd.csv",
            "encodingFormat": "text/csv",
            "name": "cd.csv"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/cd.json",
            "encodingFormat": "application/json",
            "name": "cd.json"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/cd.md",
            "encodingFormat": "text/markdown",
            "name": "cd.md"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/cd.pdf",
            "encodingFormat": "application/pdf",
            "name": "cd.pdf"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/cd.zip",
            "encodingFormat": "application/zip",
            "name": "cd.zip"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/cd/skills.zip",
            "encodingFormat": "application/zip",
            "name": "cd-skills.zip"
        }
    ],
    "markdown": "1. [Home](<https://delaparra-services.nl/>) \n1. [Knowledge hub](<https://delaparra-services.nl/knowledge-hub>) \n1. [cd](<https://delaparra-services.nl/knowledge-hub/cd>)\n\n  \n\nCategory: CLI commands \n\n# cd\n\n  Explained by [Reinier de la Parra](<https://delaparra-services.nl/about>)  Updated November 25, 2026    \n\n## What is cd?\n\n \n\ncd: Change Directory — Navigate to a different directory. ` cd ` changes the current folder in a terminal. ` cd projects/shop ` moves into that folder, ` cd .. ` goes up one level, ` cd ~ ` or just ` cd ` goes to your home folder, and ` cd - ` jumps back to the previous one. Every command you run uses the current folder as its starting point. Relative paths, Git commands and project scripts all depend on where you are.\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 cd\n\n  \n\n### What should you keep in mind with cd?\n\n \n\nIn scripts, be careful with ` cd `. If it fails because a folder does not exist, the script carries on in the wrong place, and the next command, such as a delete, runs where you did not intend. Use ` cd /path || exit 1 `, or ` set -e ` at the top, so the script stops when ` cd ` fails. Better still, use absolute paths for anything destructive.\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- [\\> and \\>\\>](<https://delaparra-services.nl/knowledge-hub/and>) \n- [| (pipe)](<https://delaparra-services.nl/knowledge-hub/pipe>) \n- [cat](<https://delaparra-services.nl/knowledge-hub/cat>) \n- [chmod](<https://delaparra-services.nl/knowledge-hub/chmod>) \n- [chown](<https://delaparra-services.nl/knowledge-hub/chown>) \n- [cp](<https://delaparra-services.nl/knowledge-hub/cp>)\n\n \n\n[All terms starting with C](<https://delaparra-services.nl/knowledge-hub#letter-c>)\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/cd/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/cd)\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/cd#webpage",
                "url": "https://delaparra-services.nl/knowledge-hub/cd",
                "name": "cd: Knowledge hub | DeLaParra Services",
                "description": "Change Directory — Navigate to a different directory.",
                "isPartOf": {
                    "@id": "https://delaparra-services.nl/#website"
                },
                "about": {
                    "@type": "DefinedTerm",
                    "@id": "https://delaparra-services.nl/knowledge-hub/cd#term",
                    "name": "cd",
                    "description": "Change Directory — Navigate to a different directory.",
                    "termCode": "cd",
                    "url": "https://delaparra-services.nl/knowledge-hub/cd",
                    "inLanguage": "en",
                    "keywords": "CLI commands",
                    "dateModified": "2026-11-25T17:46:25+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/cd#webpage"
                        },
                        {
                            "@id": "https://delaparra-services.nl/knowledge-hub/cd#dataset"
                        }
                    ]
                },
                "inLanguage": "en",
                "breadcrumb": {
                    "@id": "https://delaparra-services.nl/knowledge-hub/cd#breadcrumb"
                },
                "mainEntity": [
                    {
                        "@type": "Question",
                        "name": "What is cd?",
                        "acceptedAnswer": {
                            "@type": "Answer",
                            "text": "Change Directory — Navigate to a different directory. cd changes the current folder in a terminal. cd projects/shop moves into that folder, cd .. goes up one level, cd ~ or just cd goes to your home folder, and cd - jumps back to the previous one. Every command you run uses the current folder as its starting point. Relative paths, Git commands and project scripts all depend on where you are."
                        }
                    },
                    {
                        "@type": "Question",
                        "name": "What should you keep in mind with cd?",
                        "acceptedAnswer": {
                            "@type": "Answer",
                            "text": "In scripts, be careful with cd. If it fails because a folder does not exist, the script carries on in the wrong place, and the next command, such as a delete, runs where you did not intend. Use cd /path || exit 1, or set -e at the top, so the script stops when cd fails. Better still, use absolute paths for anything destructive."
                        }
                    }
                ],
                "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/cd#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": "cd"
                    }
                ]
            },
            {
                "@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/cd#dataset",
                "name": "cd",
                "description": "Change Directory — Navigate to a different directory.",
                "url": "https://delaparra-services.nl/knowledge-hub/cd",
                "identifier": "https://delaparra-services.nl/knowledge-hub/cd#dataset",
                "about": {
                    "@id": "https://delaparra-services.nl/knowledge-hub/cd#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:25+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": "cd.csv",
                        "encodingFormat": "text/csv",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/cd.csv",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:25+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "cd.json",
                        "encodingFormat": "application/json",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/cd.json",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:25+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "cd.md",
                        "encodingFormat": "text/markdown",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/cd.md",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:25+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "cd.pdf",
                        "encodingFormat": "application/pdf",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/cd.pdf",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:25+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "cd.zip",
                        "encodingFormat": "application/zip",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/cd.zip",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:25+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "cd-skills.zip",
                        "encodingFormat": "application/zip",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/cd/skills.zip",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:25+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    }
                ]
            }
        ]
    }
}