Answer: Set the CLAUDE_CONFIG_DIR environment variable; every ~/.claude path then lives under that directory instead. Status: Confirmed Entry: tool/claude-code/settings/change-claude-config-dir Revision: 5 Digest: sha256:d9a45f2071c14f04 (changes whenever the content changes) Timeline: Created: 2026-11-13T02:27:55Z Last changed: 2026-11-20T12:18:53Z (Windows default path: %USERPROFILE%\.claude → —) Last verified: 2026-11-20T12:18:53Z Next check: 2026-11-21T12:18:53Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of environment variable | CLAUDE_CONFIG_DIR | [1] | 2026-11-20 related file | .claude.json | [1] | 2026-11-20 Sources: [1] Anthropic. "Explore the .claude directory". https://code.claude.com/docs/en/claude-directory.md Role: primary. Accessed: 2026-11-20T12:18:53Z Quote: "If you set [`CLAUDE_CONFIG_DIR`](https://code.claude.com/docs/en/env-vars), every `~/.claude` path on this page lives under that directory instead." (Supports: environment variable) Quote: "The same applies to `.claude.json`, which otherwise sits at `~/.claude.json`." (Supports: related file) Published: 2026-11-20T02:54:41Z Snapshot SHA-256: 85ffec16f2f0e886cd77027c75469ba0752174160fe95a0acc075d585dbbe81d (captured 2026-11-20T12:18:53Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. Cross-check: not-available at 2026-11-20T12:18:53Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:18:53Z Last attempt: 2026-11-20T12:18:53Z Notes and limitations: Extracted automatically from a single official source (section "Explore the .claude directory"). Related: https://latestn.com/tool/claude-code/settings/change-dictation-language How do I change the dictation language in Claude Code? https://latestn.com/tool/claude-code/settings/change-diff-tool-setting How do I change the diff tool setting in Claude Code for JetBrains? https://latestn.com/tool/claude-code/settings/change-mcp-server-scope How do I change the scope of an MCP server in Claude Code to use it in all projects or share it with my team? https://latestn.com/tool/claude-code/settings/add-custom-security-rules How do I add custom security rules to the Claude Code security-guidance plugin? https://latestn.com/tool/claude-code/settings/adjust-extended-thinking-costs How do I adjust extended thinking settings in Claude Code to lower costs? https://latestn.com/tool/claude-code/settings/authentication-precedence How does Claude Code decide which authentication method to use when multiple credentials are present? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-20T12:18:53Z | changed | Windows default path: %USERPROFILE%\.claude → — | [1] 2026-11-19T12:14:34Z | changed | related file: — → .claude.json | [1] 2026-11-19T12:14:34Z | changed | claude.json default location: ~/.claude.json → — | [1] 2026-11-17T12:23:33Z | changed | claude.json default location: — → ~/.claude.json | [1] 2026-11-17T12:23:33Z | changed | environment variable: — → CLAUDE_CONFIG_DIR | [1] 2026-11-17T12:23:33Z | changed | Effect on .claude.json: ~/.claude.json → — | [1] 2026-11-17T12:23:33Z | changed | Environment variable: CLAUDE_CONFIG_DIR → — | [1] 2026-11-13T03:03:34Z | changed | Effect on .claude.json: The same applies to `.claude.json`, which otherwise sits at `~/.claude.json`. → ~/.claude.json | [1] 2026-11-13T02:27:55Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/settings/change-claude-config-dir/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/claude-code/settings/change-claude-config-dir POST: https://latestn.com/dispute/tool/claude-code/settings/change-claude-config-dir with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/settings/change-claude-config-dir?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I change the location of the ~/.claude directory in Claude Code? Revision 5, last verified 2026-11-20T12:18:53Z. https://latestn.com/tool/claude-code/settings/change-claude-config-dir (accessed 2026-11-21T10:01:11Z). @misc{LatestN_tool_claude_code_settings_change_claude_config_dir_r5, title = {How do I change the location of the ~/.claude directory in Claude Code?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/settings/change-claude-config-dir}}, note = {Revision 5; digest sha256:d9a45f2071c14f04; last verified 2026-11-20T12:18:53Z; accessed 2026-11-21T10:01:11Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/claude-code/settings/change-claude-config-dir