2

System Calls

Section 2 of the manual describes the Linux system calls. A system call is an entry point into the Linux kernel. Usually, system calls are not invoked directly: instead, most system calls have corresponding C library wrapper functions which perform the steps required (e.g., trapping to kernel mode) in order to invoke the system call. Thus, making a system call looks the same as invoking a normal library function.

Top 5 commands

Command Description Lookups
1 waitpid wait for process to change state
2 write write to a file descriptor
3 pipe create pipe
4 dup duplicate a file descriptor
5 stat get file status

All commands477

  • Command
  • Description
accept
accept a connection on a socket
accept4
accept a connection on a socket
access
check user's permissions for a file
acct
switch process accounting on or off
add_key
add a key to the kernel's key management facility
adjtimex
tune kernel clock
afs_syscall
unimplemented system calls
alarm
set an alarm clock for delivery of a signal
alloc_hugepages
allocate or free huge pages
arch_prctl
set architecture-specific thread state
arm_fadvise
predeclare an access pattern for file data
arm_fadvise64_64
predeclare an access pattern for file data
arm_sync_file_range
sync a file segment with disk
bdflush
start, flush, or tune buffer-dirty-flush daemon
bind
bind a name to a socket
bpf
perform a command on an extended BPF map or program
break
unimplemented system calls
brk
change data segment size
cacheflush
flush contents of instruction and/or data cache
capget
set/get capabilities of thread(s)
capset
set/get capabilities of thread(s)
chdir
change working directory
chown32
change ownership of a file
clock_getres
clock and time functions
clock_gettime
clock and time functions
clock_nanosleep
high-resolution sleep with specifiable clock
clock_settime
clock and time functions
clone
create a child process
clone2
create a child process
__clone2
create a child process
clone3
create a child process
close
close a file descriptor
connect
initiate a connection on a socket
copy_file_range
Copy a range of data from one file to another
creat
open and possibly create a file
create_module
create a loadable module entry
delete_module
unload a kernel module
dup
duplicate a file descriptor
dup2
duplicate a file descriptor
dup3
duplicate a file descriptor
epoll_create
open an epoll file descriptor
epoll_create1
open an epoll file descriptor
epoll_ctl
control interface for an epoll file descriptor
epoll_pwait
wait for an I/O event on an epoll file descriptor
epoll_wait
wait for an I/O event on an epoll file descriptor
eventfd
create a file descriptor for event notification
eventfd2
create a file descriptor for event notification
execve
execute program
execveat
execute program relative to a directory file descriptor
exit
terminate the calling process
_exit
terminate the calling process
exit_group
exit all threads in a process
faccessat
check user's permissions for a file
fadvise64
predeclare an access pattern for file data
fadvise64_64
predeclare an access pattern for file data
fanotify_init
create and initialize fanotify group
fanotify_mark
add, remove, or modify an fanotify mark on a filesystem object
fattach
unimplemented system calls
fchdir
change working directory
fchmod
change permissions of a file
fchmodat
change permissions of a file
fchown
change ownership of a file
fchown32
change ownership of a file
fchownat
change ownership of a file
fcntl
manipulate file descriptor
fcntl64
manipulate file descriptor
fdatasync
synchronize a file's in-core state with storage device
fdetach
unimplemented system calls
fgetxattr
retrieve an extended attribute value
finit_module
load a kernel module
flistxattr
list extended attribute names
fork
create a child process
free_hugepages
allocate or free huge pages
fremovexattr
remove an extended attribute
fsetxattr
set an extended attribute value
fstat
get file status
fstat64
get file status
fstatat
get file status
fstatat64
get file status
fstatfs
get filesystem statistics
fstatfs64
get filesystem statistics
fstatvfs
get filesystem statistics
fsync
synchronize a file's in-core state with storage device
ftruncate
truncate a file to a specified length
ftruncate64
truncate a file to a specified length
futex
fast user-space locking
futimesat
change timestamps of a file relative to a directory file descriptor
getcontext
get or set the user context
getcpu
determine CPU and NUMA node on which the calling thread is running
getcwd
get current working directory
getdents
get directory entries
getdents64
get directory entries
getdomainname
get/set NIS domain name
getdtablesize
get file descriptor table size
getegid
get group identity
getegid32
get group identity
geteuid
get user identity
geteuid32
get user identity
getgid
get group identity
getgid32
get group identity
getgroups
get/set list of supplementary group IDs
getgroups32
get/set list of supplementary group IDs
gethostid
get or set the unique identifier of the current host
gethostname
get/set hostname
getitimer
get or set value of an interval timer
get_kernel_syms
retrieve exported kernel and module symbols
get_mempolicy
retrieve NUMA memory policy for a thread
getmsg
unimplemented system calls
getpagesize
get memory page size
getpeername
get name of connected peer socket
getpgid
set/get process group
getpgrp
set/get process group
getpid
get process identification
getpmsg
unimplemented system calls
getppid
get process identification
getpriority
get/set program scheduling priority
getrandom
obtain a series of random bytes
getresgid
get real, effective and saved user/group IDs
getresgid32
get real, effective and saved user/group IDs
getresuid
get real, effective and saved user/group IDs
getresuid32
get real, effective and saved user/group IDs
getrlimit
get/set resource limits
get_robust_list
get/set list of robust futexes
getrusage
get resource usage
getsid
get session ID
getsockname
get socket name
getsockopt
get and set options on sockets
get_thread_area
manipulate thread-local storage information
gettid
get thread identification
gettimeofday
get / set time
getuid
get user identity
getuid32
get user identity
getunwind
copy the unwind data to caller's buffer
getxattr
retrieve an extended attribute value
gtty
unimplemented system calls
idle
make process 0 idle
inb
port I/O
inb_p
port I/O
init_module
load a kernel module
inl
port I/O
inl_p
port I/O
inotify_add_watch
add a watch to an initialized inotify instance
inotify_init
initialize an inotify instance
inotify_init1
initialize an inotify instance
inotify_rm_watch
remove an existing watch from an inotify instance
insb
port I/O
insl
port I/O
insw
port I/O
inw
port I/O
inw_p
port I/O
io_cancel
cancel an outstanding asynchronous I/O operation
ioctl
control device
ioctl_console
ioctls for console terminal and virtual consoles
ioctl_fat
manipulating the FAT filesystem
ioctl_ficlone
share some the data of one file with another file
ioctl_ficlonerange
share some the data of one file with another file
ioctl_fideduperange
share some the data of one file with another file
ioctl_getfsmap
retrieve the physical layout of the filesystem
ioctl_iflags
ioctl() operations for inode flags
ioctl_list
list of ioctl calls in Linux/i386 kernel
ioctl_ns
ioctl() operations for Linux namespaces
ioctl_tty
ioctls for terminals and serial lines
ioctl_userfaultfd
create a file descriptor for handling page faults in user space
ioctl_xfs_ag_geometry
query XFS allocation group geometry information
ioctl_xfs_bulkstat
query information for a batch of XFS inodes
ioctl_xfs_fsbulkstat
query information for a batch of XFS inodes
ioctl_xfs_fscounts
query XFS summary counter information
ioctl_xfs_fsgetxattr
query information for an open file
ioctl_xfs_fsinumbers
extract a list of valid inode numbers from an XFS filesystem
ioctl_xfs_fsop_geometry
report XFS filesystem layout and features
ioctl_xfs_getbmapx
query extent information for an open file
ioctl_xfs_getresblks
query and set XFS free space reservation information
ioctl_xfs_goingdown
shut down an XFS filesystem
ioctl_xfs_inumbers
query allocation information for groups of XFS inodes
ioctl_xfs_scrub_metadata
check XFS filesystem metadata
io_destroy
destroy an asynchronous I/O context
io_getevents
read asynchronous I/O events from the completion queue
ioperm
set port input/output permissions
iopl
change I/O privilege level
ioprio_get
get/set I/O scheduling class and priority
ioprio_set
get/set I/O scheduling class and priority
io_setup
create an asynchronous I/O context
io_submit
submit asynchronous I/O blocks for processing
ipc
System V IPC system calls
isastream
unimplemented system calls
kcmp
compare two processes to determine if they share a kernel resource
kexec_file_load
load a new kernel for later execution
kexec_load
load a new kernel for later execution
killpg
send signal to a process group
lchown
change ownership of a file
lchown32
change ownership of a file
lgetxattr
retrieve an extended attribute value
linkat
make a new name for a file
listen
listen for connections on a socket
listxattr
list extended attribute names
llistxattr
list extended attribute names
llseek
reposition read/write file offset
_llseek
reposition read/write file offset
lock
unimplemented system calls
lookup_dcookie
return a directory entry's path
lremovexattr
remove an extended attribute
lseek
reposition read/write file offset
lsetxattr
set an extended attribute value
lstat
get file status
lstat64
get file status
madvise
give advice about use of memory
madvise1
unimplemented system calls
mbind
set memory policy for a memory range
membarrier
issue memory barriers on a set of threads
memfd_create
create an anonymous file
migrate_pages
move all pages in a process to another set of nodes
mincore
determine whether pages are resident in memory
mkdirat
create a directory
mknodat
create a special or ordinary file
mlock
lock and unlock memory
mlock2
lock and unlock memory
mlockall
lock and unlock memory
mmap
map or unmap files or devices into memory
mmap2
map files or devices into memory
modify_ldt
get or set a per-process LDT entry
mount
mount filesystem
move_pages
move individual pages of a process to another node
mprotect
set protection on a region of memory
mpx
unimplemented system calls
mq_getsetattr
get/set message queue attributes
mq_notify
register for notification when a message is available
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_unlink
remove a message queue
mremap
remap a virtual memory address
msgctl
System V message control operations
msgget
get a System V message queue identifier
msgop
System V message queue operations
msgrcv
System V message queue operations
msgsnd
System V message queue operations
msync
synchronize a file with a memory map
munlock
lock and unlock memory
munlockall
lock and unlock memory
munmap
map or unmap files or devices into memory
name_to_handle_at
obtain handle for a pathname and open file via a handle
nanosleep
high-resolution sleep
newfstatat
get file status
_newselect
synchronous I/O multiplexing
nfsservctl
syscall interface to kernel nfs daemon
oldfstat
get file status
oldlstat
get file status
oldolduname
get name and information about current kernel
oldstat
get file status
olduname
get name and information about current kernel
open
open and possibly create a file
openat
open and possibly create a file
open_by_handle_at
obtain handle for a pathname and open file via a handle
outb
port I/O
outb_p
port I/O
outl
port I/O
outl_p
port I/O
outsb
port I/O
outsl
port I/O
outsw
port I/O
outw
port I/O
outw_p
port I/O
pause
wait for signal
perf_event_open
set up performance monitoring
perfmonctl
interface to IA-64 performance monitoring unit
personality
set the process execution domain
phys
unimplemented system calls
pidfd_open
obtain a file descriptor that refers to a process
pidfd_send_signal
send a signal to a process specified by a file descriptor
pipe
create pipe
pipe2
create pipe
pivot_root
change the root mount
pkey_alloc
allocate or free a protection key
pkey_free
allocate or free a protection key
pkey_mprotect
set protection on a region of memory
poll
wait for some event on a file descriptor
posix_fadvise
predeclare an access pattern for file data
ppoll
wait for some event on a file descriptor
prctl
operations on a process
pread
read from or write to a file descriptor at a given offset
pread64
read from or write to a file descriptor at a given offset
preadv
read or write data into multiple buffers
preadv2
read or write data into multiple buffers
prlimit64
get/set resource limits
process_vm_readv
transfer data between process address spaces
process_vm_writev
transfer data between process address spaces
prof
unimplemented system calls
pselect
synchronous I/O multiplexing
pselect6
synchronous I/O multiplexing
ptrace
process trace
putmsg
unimplemented system calls
putpmsg
unimplemented system calls
pwrite
read from or write to a file descriptor at a given offset
pwrite64
read from or write to a file descriptor at a given offset
pwritev
read or write data into multiple buffers
pwritev2
read or write data into multiple buffers
query_module
query the kernel for various bits pertaining to modules
quotactl
manipulate disk quotas
read
read from a file descriptor
readahead
initiate file readahead into page cache
readdir
read directory entry
readlinkat
read value of a symbolic link
readv
read or write data into multiple buffers
reboot
reboot or enable/disable Ctrl-Alt-Del
recv
receive a message from a socket
recvfrom
receive a message from a socket
recvmmsg
receive multiple messages on a socket
recvmsg
receive a message from a socket
remap_file_pages
create a nonlinear file mapping
removexattr
remove an extended attribute
renameat
change the name or location of a file
renameat2
change the name or location of a file
request_key
request a key from the kernel's key management facility
restart_syscall
restart a system call after interruption by a stop signal
rt_sigaction
examine and change a signal action
rt_sigpending
examine pending signals
rt_sigprocmask
examine and change blocked signals
rt_sigqueueinfo
queue a signal and data
rt_sigreturn
return from signal handler and cleanup stack frame
rt_sigsuspend
wait for a signal
rt_sigtimedwait
synchronously wait for queued signals
rt_tgsigqueueinfo
queue a signal and data
s390_guarded_storage
operations with z/Architecture guarded storage facility
s390_pci_mmio_read
transfer data to/from PCI MMIO memory page
s390_pci_mmio_write
transfer data to/from PCI MMIO memory page
s390_runtime_instr
enable/disable s390 CPU run-time instrumentation
s390_sthyi
emulate STHYI instruction
sbrk
change data segment size
sched_getaffinity
set and get a thread's CPU affinity mask
sched_getattr
set and get scheduling policy and attributes
sched_getparam
set and get scheduling parameters
sched_get_priority_max
get static priority range
sched_get_priority_min
get static priority range
sched_getscheduler
set and get scheduling policy/parameters
sched_rr_get_interval
get the SCHED_RR interval for the named process
sched_setaffinity
set and get a thread's CPU affinity mask
sched_setattr
set and get scheduling policy and attributes
sched_setparam
set and get scheduling parameters
sched_setscheduler
set and get scheduling policy/parameters
sched_yield
yield the processor
seccomp
operate on Secure Computing state of the process
security
unimplemented system calls
select
synchronous I/O multiplexing
select_tut
synchronous I/O multiplexing
semctl
System V semaphore control operations
semget
get a System V semaphore set identifier
semop
System V semaphore operations
semtimedop
System V semaphore operations
send
send a message on a socket
sendfile
transfer data between file descriptors
sendfile64
transfer data between file descriptors
sendmmsg
send multiple messages on a socket
sendmsg
send a message on a socket
sendto
send a message on a socket
setcontext
get or set the user context
setdomainname
get/set NIS domain name
setegid
set effective user or group ID
seteuid
set effective user or group ID
setfsgid
set group identity used for filesystem checks
setfsgid32
set group identity used for filesystem checks
setfsuid
set user identity used for filesystem checks
setfsuid32
set user identity used for filesystem checks
setgid
set group identity
setgid32
set group identity
setgroups
get/set list of supplementary group IDs
setgroups32
get/set list of supplementary group IDs
sethostid
get or set the unique identifier of the current host
sethostname
get/set hostname
setitimer
get or set value of an interval timer
set_mempolicy
set default NUMA memory policy for a thread and its children
setns
reassociate thread with a namespace
setpgid
set/get process group
setpgrp
set/get process group
setpriority
get/set program scheduling priority
setregid
set real and/or effective user or group ID
setregid32
set real and/or effective user or group ID
setresgid
set real, effective and saved user or group ID
setresgid32
set real, effective and saved user or group ID
setresuid
set real, effective and saved user or group ID
setresuid32
set real, effective and saved user or group ID
setreuid
set real and/or effective user or group ID
setreuid32
set real and/or effective user or group ID
setrlimit
get/set resource limits
set_robust_list
get/set list of robust futexes
setsockopt
get and set options on sockets
set_thread_area
manipulate thread-local storage information
set_tid_address
set pointer to thread ID
settimeofday
get / set time
setuid
set user identity
setuid32
set user identity
setup
setup devices and filesystems, mount root filesystem
setxattr
set an extended attribute value
sgetmask
manipulation of signal mask (obsolete)
shmat
System V shared memory operations
shmctl
System V shared memory control
shmdt
System V shared memory operations
shmget
allocates a System V shared memory segment
shmop
System V shared memory operations
shutdown
shut down part of a full-duplex connection
sigaction
examine and change a signal action
sigaltstack
set and/or get signal stack context
signal
ANSI C signal handling
signalfd
create a file descriptor for accepting signals
signalfd4
create a file descriptor for accepting signals
sigpending
examine pending signals
sigprocmask
examine and change blocked signals
sigqueue
queue a signal and data to a process
sigreturn
return from signal handler and cleanup stack frame
sigsuspend
wait for a signal
sigtimedwait
synchronously wait for queued signals
sigwaitinfo
synchronously wait for queued signals
socket
create an endpoint for communication
socketcall
socket system calls
socketpair
create a pair of connected sockets
splice
splice data to/from a pipe
spu_create
create a new spu context
spu_run
execute an SPU context
ssetmask
manipulation of signal mask (obsolete)
stat64
get file status
statfs
get filesystem statistics
statfs64
get filesystem statistics
statvfs
get filesystem statistics
statx
get file status (extended)
stime
set time
subpage_prot
define a subpage protection for an address range
swapoff
start/stop swapping to file/device
swapon
start/stop swapping to file/device
symlink
make a new name for a file
symlinkat
make a new name for a file
sync_file_range
sync a file segment with disk
sync_file_range2
sync a file segment with disk
syncfs
commit filesystem caches to disk
syscall
indirect system call
_syscall
invoking a system call without library support (OBSOLETE)
syscalls
Linux system calls
sysctl
read/write system parameters
_sysctl
read/write system parameters
sysfs
get filesystem type information
sysinfo
return system information
syslog
read and/or clear kernel message ring buffer; set console_loglevel
tgkill
send a signal to a thread
timer_create
create a POSIX per-process timer
timer_delete
delete a POSIX per-process timer
timerfd_create
timers that notify via file descriptors
timerfd_gettime
timers that notify via file descriptors
timerfd_settime
timers that notify via file descriptors
timer_getoverrun
get overrun count for a POSIX per-process timer
timer_gettime
arm/disarm and fetch state of POSIX per-process timer
timer_settime
arm/disarm and fetch state of POSIX per-process timer
times
get process times
tkill
send a signal to a thread
truncate64
truncate a file to a specified length
tuxcall
unimplemented system calls
ugetrlimit
get/set resource limits
umask
set file mode creation mask
umount
unmount filesystem
umount2
unmount filesystem
unimplemented
unimplemented system calls
unlinkat
delete a name and possibly the file it refers to
uselib
load shared library
userfaultfd
create a file descriptor for handling page faults in user space
ustat
get filesystem statistics
utime
change file last access and modification times
utimensat
change file timestamps with nanosecond precision
utimes
change file last access and modification times
vfork
create a child process and block parent
vhangup
virtually hangup the current terminal
vm86
enter virtual 8086 mode
vm86old
enter virtual 8086 mode
vmsplice
splice user pages to/from a pipe
vserver
unimplemented system calls
wait
wait for process to change state
wait3
wait for process to change state, BSD style
wait4
wait for process to change state, BSD style
waitid
wait for process to change state
waitpid
wait for process to change state
writev
read or write data into multiple buffers