awesome-system-calls

A categorized list of system calls used by popular Unix-like operating systems

MIT License

Stars
11
Committers
2

Awesome System Calls

A categorized list of system calls used by popular Unix-like operating systems.

Since the system calls are the primary way of how the OS processes interact with the outside world, this list can be very useful when evaluating what is possible or not on a given operating system.

There are various system call dumps on the internet and attempts to classify and group system calls in various research papers, but it's very hard to find both in the same place. And even if you do, chances are they will be wildly outdated and will only target a single OS.

The awesome word is used deliberately as an alias for "collection of", to help people Googling this project.

System call statistics

  • OpenBSD (๐Ÿก) โ€” 220

  • Linux (๐Ÿง) โ€” 355

  • FreeBSD (๐Ÿ˜ˆ) โ€” 401

  • Darwin (๐Ÿ) โ€” 453

Table of contents

System calls

Processes and threads

Lifecycle

Name OS Description
fork ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ create a child process
vfork ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ create a child process and block parent
clone ๐Ÿง create a child process or thread
clone3 ๐Ÿง create a child process or thread
posix_spawn ๐Ÿ spawn a process
execve ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ execute a program
execveat ๐Ÿง execute a program (relative to a directory file descriptor)
wait4 ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ wait for process to change state
waitid ๐Ÿก, ๐Ÿง, ๐Ÿ wait for process to change state
exit ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ terminate the calling process

Lifecycle (thread-specific)

Name OS Description
tkill ๐Ÿง send a signal to a thread
tgkill ๐Ÿง send a signal to a thread in a thread group
thrkill ๐Ÿก send a signal to a thread
exit_group ๐Ÿง exit all threads in a process's thread group
set_tid_address ๐Ÿง set pointer to a thread ID
__get_tcb ๐Ÿก get the address of the thread control block of the current thread
__set_tcb ๐Ÿก set the address of the thread control block of the current thread
__tfork ๐Ÿก create a new kernel thread in the current process
__thrsleep ๐Ÿก userspace thread sleep
__thrwakeup ๐Ÿก userspace thread wakeup

File system relationships

Name OS Description
getcwd ๐Ÿง get current working directory
__getcwd ๐Ÿก, ๐Ÿ˜ˆ get current working directory
chdir ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ set current working directory
fchdir ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ set current working directory (referenced by a file descriptor)
chroot ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ change root directory
pivot_root ๐Ÿง, ๐Ÿ change root mount
umask ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ set file creation mode mask
setfsuid ๐Ÿง set user identity used for filesystem checks
setfsgid ๐Ÿง set group identity used for filesystem checks

Credentials

UID
Name OS Description
getuid ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ get real user ID
setuid ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ set real user ID
geteuid ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ get effective user ID
seteuid ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ set effective user ID
getresuid ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ get real, effective and saved user IDs
setresuid ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ set real, effective and saved user IDs
setreuid ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ set real and effective user IDs
GID
Name OS Description
getgid ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ get real group ID
setgid ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ set real group ID
getegid ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ get effective group ID
setegid ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ set effective group ID
getresgid ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ get real, effective and saved group IDs
setresgid ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ set real, effective and saved group IDs
setregid ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ set real and effective group IDs
getgroups ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ get supplementary group IDs
setgroups ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ set supplementary group IDs
Process groups and sessions
Name OS Description
getpgrp ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ get process group
getpgid ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ get process group (referenced by a process ID)
setpgid ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ set process group (referenced by a process ID)
getsid ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ get process session ID
setsid ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ set process sesssion ID
getlogin_r ๐Ÿก get login name of the user associated with current session
setlogin ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ set login name of the user associated with current session

Signals

Name OS Description
kill ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ send signal to a process
pidfd_send_signal ๐Ÿง send signal to a process (referenced by a file descriptor)
sigaction ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ examine and change a signal action
rt_sigaction ๐Ÿง examine and change a signal action
sigaltstack ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ manipulate signal stack context
sigpending ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ examine pending signals
rt_sigpending ๐Ÿง examine pending signals
sigprocmask ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ examine and change blocked signals
rt_sigprocmask ๐Ÿง examine and change blocked signals
sigreturn ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ return from the signal handler
rt_sigreturn ๐Ÿง return from the signal handler
sigsuspend ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ wait for signal
rt_sigsuspend ๐Ÿง wait for signal
rt_sigtimedwait ๐Ÿง synchronously wait for queued signals
rt_sigqueueinfo ๐Ÿง queue a signal and data
rt_tgsigqueueinfo ๐Ÿง queue a signal and data
__thrsigdivert ๐Ÿก synchronously accept a signal

Virtual memory

Allocation and deallocation
Name OS Description
brk ๐Ÿง change data segment size
mmap ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ map files or devices into memory
mmap2 ๐Ÿง map files or devices into memory
mremap ๐Ÿง remap a virtual memory address
remap_file_pages ๐Ÿง create a nonlinear file mapping
munmap ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ remove a mapping
Locking
Name OS Description
mlock ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ lock physical pages in memory
mlock2 ๐Ÿง lock physical pages in memory
mlockall ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ lock the address space of a process
mincore ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ determine whether pages are resident in memory
munlock ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ unlock physical pages in memory
munlockall ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ unlock the address space of a process
Protection
Name OS Description
mprotect ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ control the protection of pages
minherit ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ control the inheritance of pages
mimmutable ๐Ÿก control the immutability of pages
kbind ๐Ÿก update protected memory for lazy-binding
pkey_alloc ๐Ÿง allocate a protection key
pkey_mprotect ๐Ÿง control the protection of pages and their protection keys
pkey_free ๐Ÿง free a protection key
Hints and synchronization
Name OS Description
madvise ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ give advice about use of memory
process_madvise ๐Ÿง give advice about use of memory to a process
mquery ๐Ÿก provide mapping hints to applications
msync ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ synchronize a mapped region

Timers

Name OS Description
getitimer ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ get value of interval timer
setitimer ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ set value of interval timer
timer_create ๐Ÿง create a POSIX per-process timer
timer_gettime ๐Ÿง fetch state of POSIX per-process timer
timer_settime ๐Ÿง arm/disarm the POSIX per-process timer
timer_getoverrun ๐Ÿง get overrun count for a POSIX per-process timer
timer_delete ๐Ÿง delete a POSIX per-process timer
timerfd_gettime ๐Ÿง, ๐Ÿ˜ˆ fetch state of a timer that notifies via file descriptor
timerfd_settime ๐Ÿง, ๐Ÿ˜ˆ arm/disarm a timer that notifies via file descriptor

Metadata

Name OS Description
getpid ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ get process ID
getppid ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ get process ID of the parent
gettid ๐Ÿง, ๐Ÿ get thread ID
getthrid ๐Ÿก get thread ID
getthrname ๐Ÿก get thread name
setthrname ๐Ÿก set thread name
issetugid ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ check if current executable is running setuid or setgid
personality ๐Ÿง set the process execution domain

CPU and NUMA

Name OS Description
getcpu ๐Ÿง determine CPU and NUMA node on which the calling thread is running
get_mempolicy ๐Ÿง retrieve NUMA memory policy for a thread
set_mempolicy ๐Ÿง set default NUMA memory policy for a thread
mbind ๐Ÿง set memory policy for a memory range
move_pages ๐Ÿง move individual pages of a process to another node
migrate_pages ๐Ÿง move all pages in a process to another set of nodes

Scheduling

Name OS Description
getpriority ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ get process scheduling priority
setpriority ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ set process scheduling priority
sched_yield ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ yield the processor
sched_getparam ๐Ÿง, ๐Ÿ˜ˆ get scheduling parameters
sched_setparam ๐Ÿง, ๐Ÿ˜ˆ set scheduling parameters
sched_getscheduler ๐Ÿง, ๐Ÿ˜ˆ get scheduling policy/parameters
sched_setscheduler ๐Ÿง, ๐Ÿ˜ˆ set scheduling policy/parameters
sched_getattr ๐Ÿง get scheduling policy and attributes
sched_setattr ๐Ÿง set scheduling policy and attributes
sched_get_priority_min ๐Ÿง, ๐Ÿ˜ˆ get static priority range
sched_get_priority_max ๐Ÿง, ๐Ÿ˜ˆ get static priority range
sched_rr_get_interval ๐Ÿง, ๐Ÿ˜ˆ get the SCHED_RR interval (referenced by a process ID)
sched_getaffinity ๐Ÿง get thread's CPU affinity mask
sched_setaffinity ๐Ÿง set thread's CPU affinity mask
ioprio_get ๐Ÿง get I/O scheduling class and and priority
ioprio_set ๐Ÿง set I/O scheduling class and and priority

Resource limits and utilization

Name OS Description
getrlimit ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ get resource limits
setrlimit ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ set resource limits
prlimit64 ๐Ÿง control resource limits (referenced by a process ID)
getrusage ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ get resource usage
times ๐Ÿง get process times

Terminal

Name OS Description
vhangup ๐Ÿง virtually hangup the current terminal

Network routing

Name OS Description
getrtable ๐Ÿก get default routing table of the current process
setrtable ๐Ÿก set default routing table of the current process

Sleeping

Name OS Description
nanosleep ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ high-resolution sleep
clock_nanosleep ๐Ÿง, ๐Ÿ˜ˆ high-resolution sleep with specifiable clock

Locking and synchronization

Name OS Description
futex ๐Ÿก, ๐Ÿง fast userspace locking primitive
futex_waitv ๐Ÿง wait on array of futexes
membarrier ๐Ÿง, ๐Ÿ˜ˆ issue memory barriers on a set of threads
get_robust_list ๐Ÿง get list of robust futexes
set_robust_list ๐Ÿง set list of robust futexes

Operations on other processes and threads

Name OS Description
ktrace ๐Ÿก, ๐Ÿ˜ˆ configure process tracing
ptrace ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ configure process tracing
process_vm_readv ๐Ÿง transfer data between process address spaces
process_vm_writev ๐Ÿง transfer data between process address spaces
prctl ๐Ÿง various operations on a process or a thread
kcmp ๐Ÿง, ๐Ÿ˜ˆ compare two processes to determine if they share a kernel resource

File descriptors and handles

Open or create a file

Name OS Description
open ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ open or create a file
openat ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ open or create a file (relative to a directory file descriptor)
openat2 ๐Ÿง open or create a file (relative to a directory file descriptor)
getfh ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ obtain a handle for a path
name_to_handle_at ๐Ÿง obtain a handle for a path
fhopen ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ open file via a handle
open_by_handle_at ๐Ÿง open file via a handle

Create a pipe

Name OS Description
pipe ๐Ÿก, ๐Ÿ create a pipe
pipe2 ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ create a pipe

Open or create something else

Name OS Description
eventfd2 ๐Ÿง create a file descriptor for event notification
memfd_create ๐Ÿง create an anonymous file
memfd_secret ๐Ÿง create an anonymous RAM-based file to access secret memory regions
timerfd_create ๐Ÿง, ๐Ÿ˜ˆ create a timer that notifies via file descriptor
userfaultfd ๐Ÿง create a file descriptor for handling page faults in user space
signalfd4 ๐Ÿง create a file descriptor for accepting signals
pidfd_open ๐Ÿง obtain a file descriptor that refers to a process
pidfd_getfd ๐Ÿง obtain a duplicate of another process's file descriptor

Duplicate a file descriptor

Name OS Description
dup ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ duplicate an existing file descriptor
dup2 ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ duplicate an existing file descriptor
dup3 ๐Ÿก, ๐Ÿง duplicate an existing file descriptor

Modify file descriptor metadata

Name OS Description
fcntl ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ file control
ioctl ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ device control
lseek ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ reposition read/write file offset
llseek ๐Ÿง reposition read/write file offset
getdtablecount ๐Ÿก get descriptor table count

Provide file descriptor hints

Name OS Description
fadvise64 ๐Ÿง predeclare an access pattern for file data
fadvise64_64 ๐Ÿง predeclare an access pattern for file data
readahead ๐Ÿง initiate file readahead into page cache

I/O on a file descriptor

Read
Name OS Description
read ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ read from a file descriptor
readv ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ read from a file descriptor
pread ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ read from a file descriptor at the specified offset
preadv ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ read from a file descriptor at the specified offset
preadv2 ๐Ÿง read from a file descriptor at the specified offset
Write
Name OS Description
write ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ write to a file descriptor
writev ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ write to a file descriptor
pwrite ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ write to a file descriptor at the specified offset
pwritev ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ write to a file descriptor at the specified offset
pwritev2 ๐Ÿง write to a file descriptor at the specified offset
Zero-copy
Name OS Description
copy_file_range ๐Ÿง, ๐Ÿ˜ˆ copy a range of bytes between two file descriptors that refer to files
sendfile ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ move data from source (must support mmap-like operations) to a destination file descriptor
tee ๐Ÿง duplicate pipe content
splice ๐Ÿง move data to/from a pipe
vmsplice ๐Ÿง splice user pages to/from a pipe

Close a file descriptor

Name OS Description
close ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ close a file descriptor
closefrom ๐Ÿก close all file descriptors starting from the specified file descriptor
close_range ๐Ÿง, ๐Ÿ˜ˆ close all file descriptors in a given range

File system

Create an object

Name OS Description
mkdir ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ create a directory file
mkdirat ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ create a directory file (relative to a directory file descriptor)
mkfifo ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ create a FIFO file
mkfifoat ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ create a FIFO file (relative to a directory file descriptor)
mknod ๐Ÿก, ๐Ÿ create a special file node
mknodat ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ create a special file node (relative to a directory file descriptor)
link ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ create a hard link to file
linkat ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ create a hard link to file (relative to a directory file descriptor)
symlink ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ create a symbolic link to file
symlinkat ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ create a symbolic link to file (relative to a directory file descriptor)

Modify an object

Name OS Description
rename ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ change the name or location of a file
renameat ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ change the name or location of a file (relative to a directory file descriptor)
renameat2 ๐Ÿง change the name or location of a file (relative to a directory file descriptor)
renameatx_np ๐Ÿ change the name or location of a file (relative to a directory file descriptor)
clonefileat ๐Ÿ create a copy-on-write clone of files
fclonefileat ๐Ÿ create a copy-on-write clone of files (referenced by a file descriptor)
truncate ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ truncate or extend a file to a specified length
ftruncate ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ truncate or extend a file to a specified length (referenced by a file descriptor)
fallocate ๐Ÿง manipulate file space

Change object permissions

Name OS Description
access ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ check access permissions for a file
faccessat ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ check access permissions for a file (relative to a directory file descriptor)
faccessat2 ๐Ÿง check access permissions for a file (relative to a directory file descriptor)
chmod ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ change mode of file
fchmod ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ change mode of file (referenced by a file descriptor)
fchmodat ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ change mode of file (relative to a directory file descriptor)
fchmodat2 ๐Ÿง change mode of file (relative to a directory file descriptor)
chown ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ change owner and group of a file
lchown ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ change owner and group of a file
fchown ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ change owner and group of a file (referenced by a file descriptor)
fchownat ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ change owner and group of a file (relative to a directory file descriptor)
chflags ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ set file flags
fchflags ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ set file flags (referenced by a file descriptor)
chflagsat ๐Ÿก, ๐Ÿ˜ˆ set file flags (relative to a directory file descriptor)

Retrieve object stats

Name OS Description
readlink ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ read value of a symbolic link
readlinkat ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ read value of a symbolic link (relative to a directory file descriptor)
stat ๐Ÿก, ๐Ÿง, ๐Ÿ get file status
lstat ๐Ÿก, ๐Ÿง, ๐Ÿ get file status
fstat ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ get file status (referenced by a file handle)
fstatat ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ get file status (relative to a directory file descriptor)
statx ๐Ÿง get file status (relative to a directory file descriptor)
fhstat ๐Ÿก, ๐Ÿ˜ˆ get file status (referenced by a file handle)
statfs ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ get file system statistics
fstatfs ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ get file system statistics (referenced by a file descriptor)
fhstatfs ๐Ÿก, ๐Ÿ˜ˆ get file system statistics (referenced by a file handle)
newfstatat ๐Ÿง get file system statistics (relative to a directory file descriptor)
utimes ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ set file access and modification times
lutimes ๐Ÿ˜ˆ set file access and modification times
utimensat ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ set file access and modification times (relative to a directory file descriptor)
futimes ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ set file access and modification times
futimens ๐Ÿก, ๐Ÿ˜ˆ set file access and modification times
getdents ๐Ÿก get directory entries in a filesystem independent format

Remove object

Name OS Description
unlink ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ remove directory entry
unlinkat ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ remove directory entry (relative to a directory file descriptor)
rmdir ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ remove a directory file

Advisory locking

Name OS Description
flock ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ apply or remove an advisory lock on an open file

Mount points

Name OS Description
mount ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ mount a filesystem
getfsstat ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ get list of all mounted file systems
unmount ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ dismount a filesystem
umount2 ๐Ÿง dismount a filesystem

Change global file system state

Name OS Description
sync ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ synchronize disk in-core state with storage device
fsync ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ synchronize file in-core state with storage device
fdatasync ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ synchronize file in-core state with storage device
sync_file_range ๐Ÿง synchronize file's segment with disk
sync_file_range2 ๐Ÿง synchronize file's segment with disk
syncfs ๐Ÿง commit filesystem caches to disk

Change object extended attributes

Name OS Description
getxattr ๐Ÿง, ๐Ÿ retrieve an extended attribute value
lgetxattr ๐Ÿง retrieve an extended attribute value
fgetxattr ๐Ÿง, ๐Ÿ retrieve an extended attribute value (referenced by a file descriptor)
setxattr ๐Ÿง, ๐Ÿ set an extended attribute value
lsetxattr ๐Ÿง set an extended attribute value
fsetxattr ๐Ÿง, ๐Ÿ set an extended attribute value (referenced by a file descriptor)
listxattr ๐Ÿง, ๐Ÿ list extended attribute names
llistxattr ๐Ÿง list extended attribute names
flistxattr ๐Ÿง, ๐Ÿ list extended attribute names (referenced by a file descriptor)
removexattr ๐Ÿง, ๐Ÿ remove an extended attribute
lremovexattr ๐Ÿง remove an extended attribute
fremovexattr ๐Ÿง, ๐Ÿ remove an extended attribute (referenced by a file descriptor)

Watch objects

Name OS Description
inotify_init1 ๐Ÿง initialize an inotify(7) instance
inotify_add_watch ๐Ÿง add a watch to an initialized inotify(7) instance
inotify_rm_watch ๐Ÿง remove an existing watch from an inotify(7) instance
fanotify_init ๐Ÿง create and initialize fanotify(7) group
fanotify_mark ๐Ÿง add, remove, or modify an fanotify(7) mark on a filesystem object

Retrieve filesystem variables

Name OS Description
pathconf ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ get configurable pathname variables
fpathconf ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ get configurable pathname variables (referenced by a file descriptor)

Network

Berkeley sockets

Create
Name OS Description
socket ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ create an endpoint for communication
socketpair ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ create a pair of connected sockets
Socket lifecycle
Name OS Description
connect ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ initiate a connection on a socket
bind ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ bind a name to a socket
listen ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ listen for connections on a socket
accept ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ accept a connection on a socket
accept4 ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ accept a connection on a socket
Socket metadata
Name OS Description
getsockname ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ get local protocol address associated with a socket
getpeername ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ get remote protocol address associated with a socket
getsockopt ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ get socket options
setsockopt ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ set socket options
I/O on a socket
Name OS Description
recvfrom ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ receive a message from a socket
recvmsg ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ receive a message from a socket
recvmmsg ๐Ÿก, ๐Ÿง receive a message from a socket
sendto ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ send a message on a socket
sendmsg ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ send a message on a socket
sendmmsg ๐Ÿก, ๐Ÿง send a message on a socket
shutdown ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ disable sends or receives on a socket

NFS

Name OS Description
nfssvc ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ NFS daemon services
nfsservctl ๐Ÿง NFS daemon services

Polling, multiplexing and asynchronous I/O

Polling and multiplexing

Name OS Description
select ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ synchronous I/O multiplexing
pselect ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ synchronous I/O multiplexing
pselect6 ๐Ÿง synchronous I/O multiplexing
poll ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ synchronous I/O multiplexing
ppoll ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ synchronous I/O multiplexing
kqueue ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ create a new kernel event queue
kqueue1 ๐Ÿก create a new kernel event queue
kevent ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ register events with the kernel event queue
epoll_create1 ๐Ÿง open an epoll(7) file descriptor
epoll_ctl ๐Ÿง control interface for an epoll(7) file descriptor
epoll_pwait ๐Ÿง wait for an I/O event on an epoll(7) file descriptor
epoll_pwait2 ๐Ÿง wait for an I/O event on an epoll(7) file descriptor

POSIX asynchronous I/O

Name OS Description
aio_read ๐Ÿ˜ˆ, ๐Ÿ asynchronous read from a file
aio_write ๐Ÿ˜ˆ, ๐Ÿ asynchronous write to a file
aio_fsync ๐Ÿ˜ˆ, ๐Ÿ asynchronous fsync
aio_mlock ๐Ÿ˜ˆ asynchronous mlock
aio_return ๐Ÿ˜ˆ, ๐Ÿ retrieve return status of an asynchronous I/O operation
aio_error ๐Ÿ˜ˆ, ๐Ÿ retrieve error status of asynchronous I/O operation
aio_suspend ๐Ÿ˜ˆ, ๐Ÿ suspend until asynchronous I/O operations complete or time out
aio_waitcomplete ๐Ÿ˜ˆ wait for the next completion of an asynchronous I/O operation
aio_cancel ๐Ÿ˜ˆ, ๐Ÿ cancel an outstanding asynchronous I/O operation

Asynchronous I/O (Linux)

Name OS Description
io_setup ๐Ÿง create an asynchronous I/O context
io_submit ๐Ÿง submit asynchronous I/O blocks for processing
io_getevents ๐Ÿง read asynchronous I/O events from the completion queue
io_pgetevents ๐Ÿง read asynchronous I/O events from the completion queue
io_cancel ๐Ÿง cancel an outstanding asynchronous I/O operation
io_destroy ๐Ÿง destroy an asynchronous I/O context

io_uring (Linux)

Name OS Description
io_uring_setup ๐Ÿง setup a context for performing asynchronous I/O
io_uring_register ๐Ÿง register files or user buffers for asynchronous I/O
io_uring_enter ๐Ÿง initiate and/or complete asynchronous I/O

Security

Sandboxing

Name OS Description
seccomp ๐Ÿง operate on Secure Computing state of the process
revoke ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ revoke file access
pledge ๐Ÿก force the current process into a restricted-service operating mode
unveil ๐Ÿก unveil parts of a restricted filesystem view

Jails (FreeBSD)

See Jails and Containers chapter in the FreeBSD Handbook for more details.

Name OS Description
jail ๐Ÿ˜ˆ sets up a jail and locks the current process in it
jail_attach ๐Ÿ˜ˆ attaches the current process to an existing jail
jail_get ๐Ÿ˜ˆ retrieves jail parameters
jail_set ๐Ÿ˜ˆ creates a new jail or modifies an existing one
jail_remove ๐Ÿ˜ˆ removes the jail

Capabilities (Linux)

See capabilities(7) man page for more details.

Name OS Description
capget ๐Ÿง get capabilities of thread(s)
capset ๐Ÿง set capabilities of thread(s)

Namespaces (Linux)

See namespaces(7) man page for more details.

Name OS Description
setns ๐Ÿง reassociate thread with a namespace
unshare ๐Ÿง disassociate parts of the process execution context

Landlock (Linux)

See landlock(7) man page for more details.

Name OS Description
landlock_create_ruleset ๐Ÿง create a new Landlock ruleset
landlock_add_rule ๐Ÿง add a new Landlock rule to a ruleset
landlock_restrict_self ๐Ÿง enforce a Landlock ruleset

Entropy and random

Name OS Description
getentropy ๐Ÿก, ๐Ÿ get high-quality entropy
getrandom ๐Ÿง, ๐Ÿ˜ˆ get high-quality entropy

Kernel Key Retention Service

See Kernel Key Retention Service documentation for more details.

Name OS Description
add_key ๐Ÿง add a key to the kernel's key management facility
request_key ๐Ÿง request a key from the kernel's key management facility
keyctl ๐Ÿง manipulate the kernel's key management facility

Interprocess communication

System V semaphores

Name OS Description
semget ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ retrieve semaphore set
semop ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ atomic operations on a set of semaphores
semtimedop ๐Ÿง atomic operations on a set of semaphores (with timeout)
semctl ๐Ÿง, ๐Ÿ control operations on a set of semaphores
__semctl ๐Ÿก, ๐Ÿ˜ˆ control operations on a set of semaphores

POSIX message queues

Name OS Description
msgget ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ retrieve message queue
msgrcv ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ receive a message from a message queue
msgsnd ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ send a message to a message queue
msgctl ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ control operations on a message queue
mq_open ๐Ÿง open a message queue
mq_timedreceive ๐Ÿง receive a message from a message queue
mq_timedsend ๐Ÿง send a message to a message queue
mq_notify ๐Ÿง register for notification when a message is available
mq_getsetattr ๐Ÿง get/set message queue attributes
mq_unlink ๐Ÿง remove a message queue

Shared memory

Name OS Description
shmat ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ map shared memory area
shmget ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ get shared memory area identifier
shmctl ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ shared memory area control operations
shmdt ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ unmap shared memory area

System

General

Name OS Description
reboot ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ reboot system or halt processor
sysctl ๐Ÿก, ๐Ÿ manipulate system information
sysinfo ๐Ÿง return system information
uname ๐Ÿง get name and information about current kernel
sethostname ๐Ÿง manipulate hostname
setdomainname ๐Ÿง manipulate NIS domain name

Kernel

Kernel module management (Linux)
Name OS Description
init_module ๐Ÿง load a kernel module
finit_module ๐Ÿง load a kernel module (referenced by a file descriptor)
delete_module ๐Ÿง unload a kernel module
kexec (Linux)
Name OS Description
kexec_load ๐Ÿง load a new kernel for later execution
kexec_file_load ๐Ÿง load a new kernel for later execution (referenced by a file descriptor)
Dynamic kernel linker facility (FreeBSD)

See kld(4) man page for more details

Name OS Description
kldload ๐Ÿ˜ˆ load KLD file into the kernel
kldunload ๐Ÿ˜ˆ unload KLD fileid from the kernel
kldunloadf ๐Ÿ˜ˆ unload KLD fileid from the kernel
kldsym ๐Ÿ˜ˆ look up address by symbol name in a KLD file
kldfind ๐Ÿ˜ˆ return the fileid of a KLD file
kldnext ๐Ÿ˜ˆ return the fileid of the next KLD file
kldstat ๐Ÿ˜ˆ get status of a KLD file
kldfirstmod ๐Ÿ˜ˆ return first module ID from the KLD file

System log

Name OS Description
syslog ๐Ÿง read and/or clear kernel message ring buffer
sendsyslog ๐Ÿก send a message to syslogd(8) daemon
utrace ๐Ÿก, ๐Ÿ˜ˆ insert user record in ktrace(2) log

Swap

Name OS Description
swapctl ๐Ÿก modify swap configuration
swapon ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ start swapping to a file/device
swapoff ๐Ÿง, ๐Ÿ˜ˆ stop swapping from a file/device

Clock and time functions

Name OS Description
gettimeofday ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ get the time of day
settimeofday ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ set the time of day
clock_gettime ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ get the time of a given clock
clock_settime ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ set the time for a given clock
clock_getres ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ get the resolution of a given clock
clock_adjtime ๐Ÿง tune a given clock
adjtime ๐Ÿก, ๐Ÿ˜ˆ, ๐Ÿ tune the system clock
adjtimex ๐Ÿง tune the system clock
adjfreq ๐Ÿก correct the rate of the system clock

Quotas and accounting

Name OS Description
acct ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ enable or disable process accounting
quotactl ๐Ÿก, ๐Ÿง, ๐Ÿ˜ˆ, ๐Ÿ manipulate filesystem quotas

Performance, profiling and and eBPF

Name OS Description
bpf ๐Ÿง manipulate extended Berkeley Packet Filters
perf_event_open ๐Ÿง set up performance monitoring
profil ๐Ÿก, ๐Ÿ˜ˆ manipulate program counter profiling of the current process

Meta system calls

Name OS Description
syscall ๐Ÿ˜ˆ, ๐Ÿ indirect system call
__syscall ๐Ÿ˜ˆ indirect system call
sysarch ๐Ÿก, ๐Ÿ˜ˆ architecture-dependent system call
arch_specific_syscall ๐Ÿง architecture-dependent system call
restart_syscall ๐Ÿง restart a system call after interruption by a stop signal