1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
|
'\" t
.\" Title: getino
.\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 2.0.20
.\" Date: 2026-02-23
.\" Manual: User Commands
.\" Source: util-linux 2.42-rc1
.\" Language: English
.\"
.TH "GETINO" "1" "2026-02-23" "util\-linux 2.42\-rc1" "User Commands"
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.ss \n[.ss] 0
.nh
.ad l
.de URL
\fI\\$2\fP <\\$1>\\$3
..
.als MTO URL
.if \n[.g] \{\
. mso www.tmac
. am URL
. ad l
. .
. am MTO
. ad l
. .
. LINKSTYLE blue R < >
.\}
.SH "NAME"
getino \- print the unique inode number associated to a process file descriptor or namespace for a given PID
.SH "SYNOPSIS"
.sp
\fBgetino\fP [\fB\-\-pidfs\fP|\fB\-\-cgroupns\fP|\fB\-\-ipcns\fP|\fB\-\-netns\fP|\fB\-\-mntns\fP|\fB\-\-pidns\fP|\fB\-\-timens\fP|\fB\-\-userns\fP|\fB\-\-utsns\fP] [\fB\-\-print\-pid\fP|\fB\-p\fP] \fIPID\fP[:inode]...
.sp
\fBgetino\fP [\fB\-\-print\-pid\fP|\fB\-p\fP] \fIPID\fP[:inode]...
.sp
\fBgetino\fP \fIPID\fP[:inode]...
.SH "DESCRIPTION"
.sp
\fBgetino\fP is a simple command that prints the inode numbers associated with the process file descriptor (pidfd) or namespace for all PIDs passed to it as arguments.
.sp
The kernel guarantees that the inode number associated with a process\(cqs file descriptor is exempt from reuse during the current boot cycle; therefore, a process can be uniquely identified by its PID and the inode number, conveniently so with the format \*(Aq\fIPID:inode\fP\*(Aq.
As an example, this enables race\-free signalling of processes with \fBkill\fP(1), which accepts the aforementioned \fIPID\fP format.
.sp
Inode numbers associated with a namespace for a given process are essentially namespace IDs, identical to the inode number reported by /proc/pid/ns/\fInstype\fP, see \fBnamespaces\fP(7) for more details.
.SH "OPTIONS"
.sp
\fB\-p\fP, \fB\-\-print\-pid\fP
.RS 4
Print both the PID and pidfd/namespace inode separated by a colon \*(Aq:\*(Aq, in respective order.
This format convention can be used to address processes in a race\-free manner, e.g. for signalling with the \fBkill\fP(1) command.
.RE
.sp
\fB\-\-pidfs\fP
.RS 4
Print the unique inode number for a process\(cqs pidfs file descriptor.
.RE
.sp
\fB\-\-cgroupns\fP
.RS 4
Print the unique cgroup namespace inode number. See \fBcgroup_namespaces\fP(7)
.RE
.sp
\fB\-\-ipcns\fP
.RS 4
Print the unique ipc namespace inode number. See \fBipc_namespaces\fP(7)
.RE
.sp
\fB\-\-netns\fP
.RS 4
Print the unique network namespace inode number. See \fBnetwork_namespaces\fP(7)
.RE
.sp
\fB\-\-mntns\fP
.RS 4
Print the unique mount namespace inode number. See \fBmount_namespaces\fP(7)
.RE
.sp
\fB\-\-pidns\fP
.RS 4
Print the unique pid namespace inode number. See \fBpid_namespaces\fP(7)
.RE
.sp
\fB\-\-timens\fP
.RS 4
Print the unique time namespace inode number. See \fBtime_namespaces\fP(7)
.RE
.sp
\fB\-\-userns\fP
.RS 4
Print the unique user namespace inode number. See \fBuser_namespaces\fP(7)
.RE
.sp
\fB\-\-utsns\fP
.RS 4
Print the unique uts namespace inode number. See \fButs_namespaces\fP(7)
.RE
.sp
\fB\-h\fP, \fB\-\-help\fP
.RS 4
Display help text and exit.
.RE
.sp
\fB\-V\fP, \fB\-\-version\fP
.RS 4
Display version and exit.
.RE
.SH "EXIT STATUS"
.sp
\fBgetino\fP has the following exit status values:
.sp
\fB0\fP
.RS 4
success
.RE
.sp
\fB1\fP
.RS 4
unspecified failure
.RE
.SH "NOTES"
.sp
\fBgetino\fP requires support for the pidfs pseudo\-filesystem (introduced in Linux version 6.9), to retrieve a valid inode for a process file descriptor.
.SH "AUTHORS"
.sp
.MTO "cgoesc2\(atwgu.edu" "Christian Goeschel Ndjomouo" ""
.SH "SEE ALSO"
.sp
\fBkill\fP(1) \fBpidfd_open(2)\fP \fBnamespaces(7)\fP
.SH "REPORTING BUGS"
.sp
For bug reports, use the \c
.URL "https://github.com/util\-linux/util\-linux/issues" "issue tracker" "."
.SH "AVAILABILITY"
.sp
The \fBgetino\fP command is part of the util\-linux package which can be downloaded from \c
.URL "https://www.kernel.org/pub/linux/utils/util\-linux/" "Linux Kernel Archive" "."
|