---
name: "explain"
section: "1"
platform: "linux"
package: "explain"
version: "1.4.D001-16"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/explain"
---

# explain(1)

explain system call error messages

## NAME

explain - explain system call error messages

## SYNOPSIS

**explain** \[ *option* ... \] *function* \[ *argument* ... \]

**explain** **--version**

## DESCRIPTION

The explain command is used to decode an error return read from an [*strace*(1)](/strace/1.md) listing, or silimar.  Because this is being deciphered in a different process than the original, the results will be less accurate than if the program itself were to use *libexplain*(3).

### Functions

The functions understood include:

- accept *fildes* *addr* *addrlen*

  The [*accept*(2)](/accept/2.md) system call.

- accept4 *fildes* \[\[ *sock\_addr* *sock\_addr\_size* \] *flags* \]

  The [*accept4*(2)](/accept4/2.md) system call.

- access *pathname*

  The [*access*(2)](/access/2.md) system call.

- acct *pathname*

  The [*acct*(2)](/acct/2.md) system call.

- acl\_from\_text *text*

  The [*acl\_from\_text*(3)](/acl_from_text/3.md) system call.

- acl\_get\_fd *fildes*

  The [*acl\_get\_fd*(3)](/acl_get_fd/3.md) system call.

- acl\_get\_file *pathname* *type*

  The [*acl\_get\_file*(3)](/acl_get_file/3.md) system call.

- acl\_set\_fd *fildes* *acl*

  The [*acl\_set\_fd*(3)](/acl_set_fd/3.md) system call.

- acl\_set\_file *pathname* *type* *acl*

  The [*acl\_set\_file*(3)](/acl_set_file/3.md) system call.

- acl\_to\_text *acl* *len\_p*

  The [*acl\_to\_text*(3)](/acl_to_text/3.md) system call.

- adjtime *delta* *olddelta*

  The [*adjtime*(2)](/adjtime/2.md) system call.

- adjtimex *data*

  The [*adjtimex*(2)](/adjtimex/2.md) system call.

- asprintf

  The [*asprintf*(3)](/asprintf/3.md) system call.

- bind *fildes* *addr* *sockaddr\_size*

  The [*bind*(2)](/bind/2.md) system call.

- calloc *nmemb* *size*

  The [*calloc*(3)](/calloc/3.md) system call.

- chdir *pathname*

  The [*chdir*(2)](/chdir/2.md) system call.

- chmod *pathname* *permission‐mode*

  The [*chmod*(2)](/chmod/2.md) system call.

- chown *pathname* *owner* *group*

  The [*chown*(2)](/chown/2.md) system call.

- chroot *pathname*

  The [*chroot*(2)](/chroot/2.md) system call.

- close *fildes*

  The [*close*(2)](/close/2.md) system call.

- closedir *dir*

  The [*closedir*(3)](/closedir/3.md) system call.

- connect *fildes* *serv\_addr* *serv\_addr\_size*

  The [*connect*(2)](/connect/2.md) system call.

- creat *pathname* \[ *permission‐mode*

  The [*creat*(2)](/creat/2.md) system call.

- dirfd *dir*

  The [*dirfd*(3)](/dirfd/3.md) system call.

- dup *fildes*

  The [*dup*(2)](/dup/2.md) system call.

- dup2 *oldfd* *newfd*

  The [*dup2*(2)](/dup2/2.md) system call.

- endgrent

  The [*endgrent*(3)](/endgrent/3.md) system call.

- eventfd *initval* *flags*

  The [*eventfd*(2)](/eventfd/2.md) system call.

- execlp *pathname* *arg*...

  The [*execlp*(3)](/execlp/3.md) system call.

- execv *pathname* *argv*

  The [*execv*(3)](/execv/3.md) system call.

- execve *pathname* *arg*...

  The [*execve*(2)](/execve/2.md) system call.

- execvp *pathname* *arg*...

  The [*execvp*(3)](/execvp/3.md) system call.

- fchdir *pathname*

  The [*fchdir*(2)](/fchdir/2.md) system call.

- fchmod *fildes* *mode*

  The [*fchmod*(2)](/fchmod/2.md) system call.

- fchown *fildes* *owner* *group*

  The [*fchown*(2)](/fchown/2.md) system call.

- fchownat *dirfd* *pathname* *owner* *group* *flags*

  The [*fchownat*(2)](/fchownat/2.md) system call.

- fclose *fp*

  The [*fclose*(3)](/fclose/3.md) system call.

- fcntl *fildes* *command* \[ *arg* \]

  The [*fcntl*(2)](/fcntl/2.md) system call.

- fdopen *fd* *mode*

  The [*fdopen*(3)](/fdopen/3.md) system call.

- fdopendir *fildes*

  The [*fdopendir*(3)](/fdopendir/3.md) system call.

- feof *fp*

  The [*feof*(3)](/feof/3.md) system call.

- ferror *fp*

  The [*ferror*(3)](/ferror/3.md) system call.

- fflush *fp*

  The [*fflush*(3)](/fflush/3.md) system call.

- fgetc *fp*

  The [*fgetc*(3)](/fgetc/3.md) system call.

- fgetpos *fp* *pos*

  The [*fgetpos*(3)](/fgetpos/3.md) system call.

- fgets *data* *data\_size* *fp*

  The [*fgets*(3)](/fgets/3.md) system call.

- fileno *fp*

  The [*fileno*(3)](/fileno/3.md) system call.

- flock *fildes* *command*

  The [*flock*(2)](/flock/2.md) system call.

- fork

  The [*fork*(2)](/fork/2.md) system call.

- fpathconf *fildes* *name*

  The [*fpathconf*(3)](/fpathconf/3.md) system call.

- fpurge *fp*

  The [*fpurge*(3)](/fpurge/3.md) system call.

- fread *ptr* *size* *nmemb* *fp*

  The [*fread*(3)](/fread/3.md) system call.

- fopen *pathname* *mode*

  The *fopen*(2) system call. The *pathname* argument may need to be quoted to insulate white space and punctuation from the shell. The *mode* argument (a textual equivalent of the *open* system call's *flags* argument). See [*fopen*(3)](/fopen/3.md) for more information.

- fputc *c* \[ *fp* \]

  The [*fputc*(3)](/fputc/3.md) system call.

- fputs *s* *fp*

  The [*fputs*(3)](/fputs/3.md) system call.

- freopen *pathname* *flags* *fp*

  The [*freopen*(3)](/freopen/3.md) system call.

- fseek *fp* *offset* *whence*

  The [*fseek*(3)](/fseek/3.md) system call.

- fseeko *fp* *offset* *whence*

  The [*fseeko*(3)](/fseeko/3.md) system call.

- fsetpos *fp* *pos*

  The [*fsetpos*(3)](/fsetpos/3.md) system call.

- fstat *pathname*

  The [*fstat*(2)](/fstat/2.md) system call.

- fstatat *fildes* *pathname* *data* *flags*

  The [*fstatat*(2)](/fstatat/2.md) system call.

- fstatfs *fildes* *data*

  The [*fstatfs*(2)](/fstatfs/2.md) system call.

- fstatvfs *fildes* *data*

  The [*fstatvfs*(2)](/fstatvfs/2.md) system call.

- fsync *fildes*

  The [*fsync*(2)](/fsync/2.md) system call.

- ftell *fp*

  The [*ftell*(3)](/ftell/3.md) system call.

- ftello *fp*

  The [*ftello*(3)](/ftello/3.md) system call.

- ftime *tp*

  The [*ftime*(3)](/ftime/3.md) system call.

- ftruncate *fildes* *length*

  The [*ftruncate*(2)](/ftruncate/2.md) system call.

- futimens *fildes* *data*

  The [*futimens*(3)](/futimens/3.md) system call.

- futimes *fildes* *tv\[0\]* *data\[1\]*

  The [*futimes*(3)](/futimes/3.md) system call.

- futimesat *fildes* *pathname* *data*

  The [*futimesat*(2)](/futimesat/2.md) system call.

- getc *fp*

  The [*getc*(3)](/getc/3.md) system call.

- getchar

  The [*getchar*(3)](/getchar/3.md) system call.

- getcwd *buf* *size*

  The [*getcwd*(2)](/getcwd/2.md) system call.

- getdomainname *data* *data\_size*

  The [*getdomainname*(2)](/getdomainname/2.md) system call.

- getgrent

  The [*getgrent*(3)](/getgrent/3.md) system call.

- getgrouplist *user* *group* *groups* *ngroups*

  The [*getgrouplist*(3)](/getgrouplist/3.md) system call.

- getgroups *data\_size* *data*

  The [*getgroups*(2)](/getgroups/2.md) system call.

- gethostbyname *name*

  The [*gethostbyname*(3)](/gethostbyname/3.md) system call.

- gethostid

  The [*gethostid*(3)](/gethostid/3.md) system call.

- gethostname \[ *data* *data\_size* \]

  The [*gethostname*(2)](/gethostname/2.md) system call.

- getpeername *fildes* *sock\_addr* *sock\_addr\_size*

  The [*getpeername*(2)](/getpeername/2.md) system call.

- getpgid *pid*

  The [*getpgid*(2)](/getpgid/2.md) system call.

- getpgrp *pid*

  The [*getpgrp*(2)](/getpgrp/2.md) system call.

- getpriority *which* *who*

  The [*getpriority*(2)](/getpriority/2.md) system call.

- getresgid *rgid* *egid* *sgid*

  The [*getresgid*(2)](/getresgid/2.md) system call.

- getresuid *ruid* *euid* *suid*

  The [*getresuid*(2)](/getresuid/2.md) system call.

- getrlimit *resource* *rlim*

  The [*getrlimit*(2)](/getrlimit/2.md) system call.

- getrusage *who* *usage*

  The [*getrusage*(2)](/getrusage/2.md) system call.

- getsockname *fildes* \[ *sock\_addr* \[ *sock\_addr\_size* \]\]

  The [*getsockname*(2)](/getsockname/2.md) system call.

- getsockopt *fildes* *level* *name* *data* *data\_size*

  The [*getsockopt*(2)](/getsockopt/2.md) system call.

- gettimeofday \[ *tv* \[ *tz* \] \]

  The [*gettimeofday*(2)](/gettimeofday/2.md) system call.

- getw *fp*

  The [*getw*(3)](/getw/3.md) system call.

- iconv *cd* *inbuf* *inbytesleft* *outbuf* *outbytesleft*

  The [*iconv*(3)](/iconv/3.md) system call.

- iconv\_close *cd*

  The [*iconv\_close*(3)](/iconv_close/3.md) system call.

- iconv\_open *tocode* *fromcode*

  The [*iconv\_open*(3)](/iconv_open/3.md) system call.

- ioctl *fildes* *request* *data*

  The [*ioctl*(2)](/ioctl/2.md) system call.

- kill *pid* *sig*

  The [*kill*(2)](/kill/2.md) system call.

- lchmod *pathname* *mode*

  The [*lchmod*(2)](/lchmod/2.md) system call.

- lchown *pathname* *owner* *group*

  The [*lchown*(2)](/lchown/2.md) system call.

- lchownat *fildes* *pathname* *uid* *gid*

  The *lchownat*(2) system call.

- link *oldpath* *newpath*

  The [*link*(2)](/link/2.md) system call.

- linkat *old\_fildes* *old\_path* *new\_fildes* *new\_path* *flags*

  The [*linkat*(2)](/linkat/2.md) system call.

- listen *fildes* *backlog*

  The [*listen*(2)](/listen/2.md) system call.

- lseek *fildes* *offset* *whence*

  The [*lseek*(2)](/lseek/2.md) system call.

- lstat *pathname*

  The [*lstat*(2)](/lstat/2.md) system call.

- lutimes *pathname* *data*

  The [*lutimes*(3)](/lutimes/3.md) system call.

- malloc *size*

  The [*malloc*(3)](/malloc/3.md) system call.

- mkdir *pathname* \[ *mode* \]

  The [*mkdir*(2)](/mkdir/2.md) system call.

- mkdtemp *pathname*

  The [*mkdtemp*(3)](/mkdtemp/3.md) system call.

- mknod *pathname* *mode* *dev*

  The [*mknod*(2)](/mknod/2.md) system call.

- mkostemp *templat* *flags*

  The [*mkostemp*(3)](/mkostemp/3.md) system call.

- mkstemp *templat*

  The [*mkstemp*(3)](/mkstemp/3.md) system call.

- mktemp *pathname*

  The [*mktemp*(3)](/mktemp/3.md) system call.

- mmap *data* *data\_size* *prot* *flags* *fildes* *offset*

  The [*mmap*(2)](/mmap/2.md) system call.

- mount *source* *target* *file\_systems\_type* *flags* *data*

  The [*mount*(2)](/mount/2.md) system call.

- munmap *data* *data\_size*

  The [*munmap*(2)](/munmap/2.md) system call.

- nanosleep *req* *rem*

  The [*nanosleep*(2)](/nanosleep/2.md) system call.

- nice *inc*

  The [*nice*(2)](/nice/2.md) system call.

- open *pathname* *flags* \[ *mode* \]

  The [*open*(2)](/open/2.md) system call. The *pathname* argument may need to be quoted to insulate white space and punctuation from the shell. The *flags* argument may be numeric or symbolic. The *mode* argument may be numeric or symbolic.

- openat *fildes* *pathname* *flags* *mode*

  The [*openat*(2)](/openat/2.md) system call. The *flags* argument may be numeric or symbolic. The *mode* argument may be numeric or symbolic.

- opendir *pathname*

  The [*opendir*(3)](/opendir/3.md) system call.

- pathconf *pathname* *name*

  The [*pathconf*(3)](/pathconf/3.md) system call.

- pclose *fp*

  The [*pclose*(3)](/pclose/3.md) system call.

- pipe *pipefd*

  The [*pipe*(2)](/pipe/2.md) system call.

- pipe2 *fildes* *flags*

  The [*pipe2*(2)](/pipe2/2.md) system call.

- poll *fds* *nfds* *timeout*

  The [*poll*(2)](/poll/2.md) system call.

- popen *command* *flags*

  The [*popen*(3)](/popen/3.md) system call.

- pread *fildes* *data* *data\_size* *offset*

  The [*pread*(2)](/pread/2.md) system call.

- ptrace *request* *pid* *addr* *data*

  The [*ptrace*(2)](/ptrace/2.md) system call.

- putc *c* *fp*

  The [*putc*(3)](/putc/3.md) system call.

- putchar *c*

  The [*putchar*(3)](/putchar/3.md) system call.

- putenv *string*

  The [*putenv*(3)](/putenv/3.md) system call.

- puts *s*

  The [*puts*(3)](/puts/3.md) system call.

- putw *value* *fp*

  The [*putw*(3)](/putw/3.md) system call.

- pwrite *fildes* *data* *data\_size* *offset*

  The [*pwrite*(2)](/pwrite/2.md) system call.

- raise *sig*

  The [*raise*(3)](/raise/3.md) system call.

- read *fildes* *data* *data‐size*

  The [*read*(2)](/read/2.md) system call.

- realloc *ptr* *size*

  The [*realloc*(3)](/realloc/3.md) system call.

- realpath *pathname* *resolved\_pathname*

  The [*realpath*(3)](/realpath/3.md) system call.

- rename *oldpath* *newpath*

  The [*rename*(2)](/rename/2.md) system call.

- readv *fildes* *iov* ...

  The [*readv*(2)](/readv/2.md) system call.

- select *nfds* *readfds* *writefds* *exceptfds* *timeout*

  The [*select*(2)](/select/2.md) system call.

- setbuf *fp* *data*

  The [*setbuf*(3)](/setbuf/3.md) system call.

- setbuffer *fp* *data* *size*

  The [*setbuffer*(3)](/setbuffer/3.md) system call.

- setdomainname *data* *data\_size*

  The [*setdomainname*(2)](/setdomainname/2.md) system call.

- setenv *name* *value* *overwrite*

  The [*setenv*(3)](/setenv/3.md) system call.

- setgid *gid*

  The [*setgid*(2)](/setgid/2.md) system call.

- setgrent

  The [*setgrent*(3)](/setgrent/3.md) system call.

- setgroups *data\_size* *data*

  The [*setgroups*(2)](/setgroups/2.md) system call.

- sethostname *name* \[ *name\_size* \]

  The [*sethostname*(2)](/sethostname/2.md) system call.

- setlinebuf *fp*

  The [*setlinebuf*(3)](/setlinebuf/3.md) system call.

- setpgid \[ *pid* \[ *pgid* \]\]

  The [*setpgid*(2)](/setpgid/2.md) system call.

- setpgrp *pid* *pgid*

  The [*setpgrp*(2)](/setpgrp/2.md) system call.

- setpriority *which* *who* *prio*

  The [*setpriority*(2)](/setpriority/2.md) system call.

- setregid *rgid* *egid*

  The [*setregid*(2)](/setregid/2.md) system call.

- setreuid *ruid* *euid*

  The [*setreuid*(2)](/setreuid/2.md) system call.

- setresgid *rgid* *egid* *sgid*

  The [*setresgid*(2)](/setresgid/2.md) system call.

- setresuid *ruid* *euid* *suid*

  The [*setresuid*(2)](/setresuid/2.md) system call.

- setreuid *ruid* *euid*

  The [*setreuid*(2)](/setreuid/2.md) system call.

- setsid

  The [*setsid*(2)](/setsid/2.md) system call.

- setsockopt *fildes* *level* *name* *data* *data\_size*

  The [*setsockopt*(2)](/setsockopt/2.md) system call.

- settimeofday *tv* *tz*

  The [*settimeofday*(2)](/settimeofday/2.md) system call.

- setuid *uid*

  The [*setuid*(2)](/setuid/2.md) system call.

- setvbuf *fp* *data* *mode* *size*

  The [*setvbuf*(3)](/setvbuf/3.md) system call.

- shmat *shmid* *shmaddr* *shmflg*

  The [*shmat*(2)](/shmat/2.md) system call.

- shmctl *shmid* *command* *data*

  The [*shmctl*(2)](/shmctl/2.md) system call.

- signalfd *fildes* *mask* *flags*

  The [*signalfd*(2)](/signalfd/2.md) system call.

- sleep *seconds*

  The [*sleep*(3)](/sleep/3.md) system call.

- socket *domain* *type* *protocol*

  The [*socket*(2)](/socket/2.md) system call.

- socketpair *domain* *type* *protocol* *sv*

  The [*socketpair*(2)](/socketpair/2.md) system call.

- stat *pathname*

  The [*stat*(2)](/stat/2.md) system call.

- statfs *pathname* *data*

  The [*statfs*(2)](/statfs/2.md) system call.

- statvfs *pathname* *data*

  The [*statvfs*(2)](/statvfs/2.md) system call.

- stime *t*

  The [*stime*(2)](/stime/2.md) system call.

- strcoll *s1* *s2*

  The [*strcoll*(3)](/strcoll/3.md) system call.

- strdup *data*

  The [*strdup*(3)](/strdup/3.md) system call.

- strerror

  The error given will be printed out with all known detail.

- strndup *data* *data\_size*

  The [*strndup*(3)](/strndup/3.md) system call.

- strtod *nptr* *endptr*

  The [*strtod*(3)](/strtod/3.md) system call.

- strtof *nptr* *endptr*

  The [*strtof*(3)](/strtof/3.md) system call.

- strtol *nptr* *endptr* *base*

  The [*strtol*(3)](/strtol/3.md) system call.

- strtold *nptr* *endptr*

  The [*strtold*(3)](/strtold/3.md) system call.

- strtoll *nptr* *endptr* *base*

  The [*strtoll*(3)](/strtoll/3.md) system call.

- strtoul *nptr* *endptr* *base*

  The [*strtoul*(3)](/strtoul/3.md) system call.

- strtoull *nptr* *endptr* *base*

  The [*strtoull*(3)](/strtoull/3.md) system call.

- symlink *oldpath* *newpath*

  The [*symlink*(2)](/symlink/2.md) system call.

- system *command*

  The [*system*(3)](/system/3.md) system call.

- tcdrain *fildes*

  The [*tcdrain*(3)](/tcdrain/3.md) system call.

- tcflow *fildes* *action*

  The [*tcflow*(3)](/tcflow/3.md) system call.

- tcflush *fildes* *selector*

  The [*tcflush*(3)](/tcflush/3.md) system call.

- tcgetattr *fildes* *data*

  The [*tcgetattr*(3)](/tcgetattr/3.md) system call.

- tcsendbreak *fildes* *duration*

  The [*tcsendbreak*(3)](/tcsendbreak/3.md) system call.

- tcsetattr *fildes* *options* *data*

  The [*tcsetattr*(3)](/tcsetattr/3.md) system call.

- telldir *dir*

  The [*telldir*(3)](/telldir/3.md) system call.

- tempnam *dir* *prefix*

  The [*tempnam*(3)](/tempnam/3.md) system call.

- time *t*

  The [*time*(2)](/time/2.md) system call.

- timerfd\_create *clockid* *flags*

  The [*timerfd\_create*(2)](/timerfd_create/2.md) system call.

- tmpfile

  The [*tmpfile*(3)](/tmpfile/3.md) system call.

- tmpnam *pathname*

  The [*tmpnam*(3)](/tmpnam/3.md) system call.

- truncate *pathname* *size*

  The [*truncate*(2)](/truncate/2.md) system call.

- usleep *usec*

  The [*usleep*(3)](/usleep/3.md) system call.

- uname *data*

  The [*uname*(2)](/uname/2.md) system call.

- ungetc *c* *fp*

  The [*ungetc*(3)](/ungetc/3.md) system call.

- unlink *pathname*

  The [*unlink*(2)](/unlink/2.md) system call.

- unsetenv *name*

  The [*unsetenv*(3)](/unsetenv/3.md) system call.

- ustat *dev* *ubuf*

  The [*ustat*(2)](/ustat/2.md) system call.

- utime *pathname* \[ *times* \]

  The [*utime*(2)](/utime/2.md) system call.

- utimens *pathname* \[ *data* \]

  The *utimens*(2) system call.

- utimensat \[ *fildes* \] *pathname* \[ *data* \[ *flags* \]\]

  The [*utimensat*(2)](/utimensat/2.md) system call.

- utimes *pathname* *data*

  The [*utimes*(2)](/utimes/2.md) system call.

- vasprintf *data* *format* *ap*

  The [*vasprintf*(3)](/vasprintf/3.md) system call.

- vfork

  The [*vfork*(2)](/vfork/2.md) system call.

- wait *status*

  The [*wait*(2)](/wait/2.md) system call.

- wait3 *status* *options* *rusage*

  The [*wait3*(2)](/wait3/2.md) system call.

- wait4 *pid* *status* *options* *rusage*

  The [*wait4*(2)](/wait4/2.md) system call.

- waitpid *pid* *status* *options*

  The [*waitpid*(2)](/waitpid/2.md) system call.

- write *fildes* *data* *data‐size*

  The [*write*(2)](/write/2.md) system call.

- writev *fildes* *data* *data‐size*

  The [*writev*(2)](/writev/2.md) system call.

Do not include the perentheses used to make the call.

## OPTIONS

The explain command understands the following options:

- **-E**

  The exit staus, success or fail, will be printed immediately before the *access* command terminates.

- **-e** *number*

  The value of *errno* as a number (*e.g.* 2), or as a symbol (*e.g.* ENOENT), or as the text of its meaning (*e.g.* No such file or directory*).* *You will need quotes to insulate spaces and punctuation from the shell.*

- **-V**

  *Print the version of the explain executing.*

## EXIT STATUS

*The explain command exits with status 1 on any error.* *The explain command only exits with status 0 if there are no errors.*

## COPYRIGHT

*explain version 1.4*\
 *Copyright* *(C)* *2008, 2009, 2010, 2011, 2012, 2013, 2014* *Peter Miller*

## AUTHOR

*Written by Peter Miller \<pmiller@opensource.org.au\>*
