Debian Codegraph @

upstream/debian-unstable/man5/proc_pid_exe.5

raw
1 .\" Copyright 1994-1995, Daniel Quinlan <[email protected]>
2 .\" Copyright 2002-2017, Michael Kerrisk <[email protected]>
3 .\" Copyright, the authors of the Linux man-pages project
4 .\"
5 .\" SPDX-License-Identifier: GPL-3.0-or-later
6 .\"
7 .TH proc_pid_exe 5 2026-02-08 "Linux man-pages 6.18"
8 .SH NAME
9 /proc/pid/exe \- symbolic link to program pathname
10 .SH DESCRIPTION
11 .TP
12 .IR /proc/ pid /exe
13 Under Linux 2.2 and later,
14 this file is a symbolic link
15 containing the actual pathname of the executed command.
16 This symbolic link can be dereferenced normally;
17 attempting to open it will open the executable.
18 You can even type
19 .IR /proc/ pid /exe
20 to run another copy of the same executable that is being run by
21 process
22 .IR pid .
23 If the pathname has been unlinked,
24 the symbolic link will contain
25 the string \[aq]\ (deleted)\[aq] appended to the original pathname.
26 .\" The following was still true as at kernel 2.6.13
27 In a multithreaded process,
28 the contents of this symbolic link
29 are not available if the main thread has already terminated
30 (typically by calling
31 .BR pthread_exit (3)).
32 .IP
33 Permission to dereference or read
34 .RB ( readlink (2))
35 this symbolic link is governed by a ptrace access mode
36 .B PTRACE_MODE_READ_FSCREDS
37 check;
38 see
39 .BR ptrace (2).
40 .IP
41 Under Linux 2.0 and earlier,
42 .IR /proc/ pid /exe
43 is a pointer to the binary which was executed,
44 and appears as a symbolic link.
45 A
46 .BR readlink (2)
47 call on this file under Linux 2.0 returns a string in the format:
48 .IP
49 .in +4n
50 .EX
51 [device]:inode
52 .EE
53 .in
54 .IP
55 For example,
56 [0301]:1502 would be inode 1502 on device
57 major 03 (IDE, MFM, etc.\& drives)
58 minor 01 (first partition on the first drive).
59 .IP
60 .BR find (1)
61 with the
62 .I \-inum
63 option can be used to locate the file.
64 .SH SEE ALSO
65 .BR proc (5)