How do I find a process's current working directory (CWD)?

Updated -

When coredumps are enabled and a process crashes and produces a core, the coredump will be written to the process's current working directory (CWD). A running process's CWD can be determined by looking at /proc/pid/cwd, where pid is the process's Process ID (pid). The file /proc/pid/cwd will be a symbolic link to the process's current working directory.

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.