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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content