syscalls(2)
okay so bestie, you've stumbled into syscalls(2) from the System Calls Manual and honestly? this is the blueprint. the origin story. the one that explains why literally every other syscall manpage exists. ๐ฆ
๐ NAME ๐
syscalls โ Linux system calls
that's it. that's the name. short, sweet, iconic. ๐
โจ SYNOPSIS โจ
Linux system calls.
likeโฆ yes. the synopsis is the thing itself. minimalist queen behavior, no notes. ๐
๐ธ DESCRIPTION ๐ธ
bestie. listen. the system call is the fundamental interface between an application and the Linux kernel. that's not me being dramatic, that's literally the words. it's the doorway. the connection. the way your little program gets to whisper to the kernel and have the kernel actually do something about it. ๐ซถ
๐ System calls and library wrapper functions ๐
okay so here's the tea: syscalls are generally not invoked directly โ you go through wrapper functions in glibc (or maybe some other library, we don't gatekeep). wanna know about direct invocation? that's a whole other vibe, go read intro(2). ๐
often โ but not always, ok don't @ me โ the wrapper function's name is exactly the same as the name of the system call it invokes. example: glibc has a function chdir() which invokes the underlying "chdir" system call. same name, different layer, so cute. โจ
and often the glibc wrapper is thin โ like, it does barely any work other than copying arguments to the right registers before invoking the system call, and then setting errno appropriately after the system call has returned. (fun fact: these are the exact same steps performed by syscall(2), which you can use to invoke system calls that have no wrapper function at all. icon behavior.) ๐
okay this part matters so pay attention bestie: system calls indicate a failure by returning a negative error number to the caller on architectures without a separate error register/flag, as noted insyscall(2). when that happens, the wrapper function negates the returned error number (to make it positive), copies it toerrno, and returns-1to the caller of the wrapper. that's the failure pipeline. that's the lore. ๐ญ
sometimes though, the wrapper function does extra work before invoking the system call. example: nowadays there are (for reasons described below, we'll get there) two related system calls, truncate(2) and truncate64(2), and the glibc truncate() wrapper function checks which of those system calls are provided by the kernel and determines which should be employed. it's a whole matchmaking situation. ๐
๐ System call list ๐
below is a list of the Linux system calls. in that list, the Kernel column tells you the kernel version for those system calls that were new in Linux 2.2, or have appeared since that kernel version. ๐
note the following points, bestie, because the version-column lore is REAL:
- where no kernel version is indicated, the system call appeared in Linux 1.0 or earlier. ancient. vintage. the elders. ๐ง
- where a system call is marked
"1.2"this means the system call probably appeared in a Linux 1.1.x kernel version, and first appeared in a stable kernel with 1.2. (development of the Linux 1.2 kernel was initiated from a branch of Linux 1.0.6 via the Linux 1.1.x unstable kernel series.) ๐ - where a system call is marked
"2.0"this means the system call probably appeared in a Linux 1.3.x kernel version, and first appeared in a stable kernel with Linux 2.0. (development of the Linux 2.0 kernel was initiated from a branch of Linux 1.2.x, somewhere around Linux 1.2.10, via the Linux 1.3.x unstable kernel series.) โจ - where a system call is marked
"2.2"this means the system call probably appeared in a Linux 2.1.x kernel version, and first appeared in a stable kernel with Linux 2.2.0. (development of the Linux 2.2 kernel was initiated from a branch of Linux 2.0.21 via the Linux 2.1.x unstable kernel series.) ๐ - where a system call is marked
"2.4"this means the system call probably appeared in a Linux 2.3.x kernel version, and first appeared in a stable kernel with Linux 2.4.0. (development of the Linux 2.4 kernel was initiated from a branch of Linux 2.2.8 via the Linux 2.3.x unstable kernel series.) ๐ - where a system call is marked
"2.6"this means the system call probably appeared in a Linux 2.5.x kernel version, and first appeared in a stable kernel with Linux 2.6.0. (development of Linux 2.6 was initiated from a branch of Linux 2.4.15 via the Linux 2.5.x unstable kernel series.) ๐ฆ - starting with Linux 2.6.0, the development model changed, and new system calls may appear in each Linux 2.6.x release. in this case, the exact version number where the system call appeared is shown. this convention continues with the Linux 3.x kernel series, which followed on from Linux 2.6.39; and the Linux 4.x kernel series, which followed on from Linux 3.19; and the Linux 5.x kernel series, which followed on from Linux 4.20; and the Linux 6.x kernel series, which followed on from Linux 5.19. so many series. so many follow-ons. the lineage is unbroken. ๐
- in some cases, a system call was added to a stable kernel series after it branched from the previous stable kernel series, and then backported into the earlier stable kernel series. for example some system calls that appeared in Linux 2.6.x were also backported into a Linux 2.4.x release after Linux 2.4.15. when this is so, the version where the system call appeared in both of the major kernel series is listed. double-dipping, but make it versioning. ๐
and now for the main event, the list of system calls that are available as at Linux 5.14 (or in a few cases only on older kernels) is as follows: ๐
okay so the big list continues and it's giving encyclopedia energy ๐ every syscall, every kernel debut, every little footnote โ no cap, it's all here.
_llseek(2)โ kernel1.2_newselect(2)โ kernel2.0_sysctl(2)โ kernel2.0โ Removed in5.5๐accept(2)โ kernel2.0โ See notes onsocketcall(2)accept4(2)โ kernel2.6.28access(2)โ kernel1.0acct(2)โ kernel1.0add_key(2)โ kernel2.6.10adjtimex(2)โ kernel1.0alarm(2)โ kernel1.0alloc_hugepages(2)โ kernel2.5.36โ Removed in2.5.44๐ญarc_gettls(2)โ kernel3.9โ ARC onlyarc_settls(2)โ kernel3.9โ ARC onlyarc_usr_cmpxchg(2)โ kernel4.9โ ARC onlyarch_prctl(2)โ kernel2.6โx86_64,x86since4.12atomic_barrier(2)โ kernel2.6.34โm68konlyatomic_cmpxchg_32(2)โ kernel2.6.34โm68konlybdflush(2)โ kernel1.2โ Deprecated (does nothing) since2.6, removed in5.15bind(2)โ kernel2.0โ See notes onsocketcall(2)bpf(2)โ kernel3.18brk(2)โ kernel1.0breakpoint(2)โ kernel2.2โ ARM OABI only, defined with__ARM_NRprefixcacheflush(2)โ kernel1.2โ Not onx86capget(2)โ kernel2.2capset(2)โ kernel2.2chdir(2)โ kernel1.0chmod(2)โ kernel1.0chown(2)โ kernel2.2โ Seechown(2)for version detailschown32(2)โ kernel2.4chroot(2)โ kernel1.0clock_adjtime(2)โ kernel2.6.39clock_getres(2)โ kernel2.6clock_gettime(2)โ kernel2.6clock_nanosleep(2)โ kernel2.6clock_settime(2)โ kernel2.6clone2(2)โ kernel2.4โIA-64onlyclone(2)โ kernel1.0clone3(2)โ kernel5.3close(2)โ kernel1.0close_range(2)โ kernel5.9connect(2)โ kernel2.0โ See notes onsocketcall(2)copy_file_range(2)โ kernel4.5creat(2)โ kernel1.0create_module(2)โ kernel1.0โ Removed in2.6delete_module(2)โ kernel1.0dup(2)โ kernel1.0dup2(2)โ kernel1.0dup3(2)โ kernel2.6.27epoll_create(2)โ kernel2.6epoll_create1(2)โ kernel2.6.27epoll_ctl(2)โ kernel2.6epoll_pwait(2)โ kernel2.6.19epoll_pwait2(2)โ kernel5.11epoll_wait(2)โ kernel2.6eventfd(2)โ kernel2.6.22eventfd2(2)โ kernel2.6.27execv(2)โ kernel2.0โSPARC/SPARC64only, for compatibility withSunOSexecve(2)โ kernel1.0execveat(2)โ kernel3.19exit(2)โ kernel1.0exit_group(2)โ kernel2.6faccessat(2)โ kernel2.6.16faccessat2(2)โ kernel5.8fadvise64(2)โ kernel2.6fadvise64_64(2)โ kernel2.6fallocate(2)โ kernel2.6.23fanotify_init(2)โ kernel2.6.37fanotify_mark(2)โ kernel2.6.37fchdir(2)โ kernel1.0fchmod(2)โ kernel1.0fchmodat(2)โ kernel2.6.16fchown(2)โ kernel1.0fchown32(2)โ kernel2.4fchownat(2)โ kernel2.6.16fcntl(2)โ kernel1.0fcntl64(2)โ kernel2.4fdatasync(2)โ kernel2.0fgetxattr(2)โ kernel2.6; 2.4.18finit_module(2)โ kernel3.8flistxattr(2)โ kernel2.6; 2.4.18flock(2)โ kernel2.0fork(2)โ kernel1.0free_hugepages(2)โ kernel2.5.36โ Removed in2.5.44fremovexattr(2)โ kernel2.6; 2.4.18fsconfig(2)โ kernel5.2fsetxattr(2)โ kernel2.6; 2.4.18fsmount(2)โ kernel5.2fsopen(2)โ kernel5.2fspick(2)โ kernel5.2fstat(2)โ kernel1.0fstat64(2)โ kernel2.4fstatat64(2)โ kernel2.6.16fstatfs(2)โ kernel1.0fstatfs64(2)โ kernel2.6fsync(2)โ kernel1.0ftruncate(2)โ kernel1.0ftruncate64(2)โ kernel2.4futex(2)โ kernel2.6futimesat(2)โ kernel2.6.16get_kernel_syms(2)โ kernel1.0โ Removed in2.6get_mempolicy(2)โ kernel2.6.6get_robust_list(2)โ kernel2.6.17get_thread_area(2)โ kernel2.6get_tls(2)โ kernel4.15โ ARM OABI only, has__ARM_NRprefixgetcpu(2)โ kernel2.6.19getcwd(2)โ kernel2.2getdents(2)โ kernel2.0getdents64(2)โ kernel2.4getdomainname(2)โ kernel2.2โSPARC,SPARC64; available asosf_getdomainname(2)on Alpha since Linux2.0getdtablesize(2)โ kernel2.0โSPARC(removed in2.6.26), available on Alpha asosf_getdtablesize(2)getegid(2)โ kernel1.0getegid32(2)โ kernel2.4geteuid(2)โ kernel1.0geteuid32(2)โ kernel2.4getgid(2)โ kernel1.0getgid32(2)โ kernel2.4getgroups(2)โ kernel1.0getgroups32(2)โ kernel2.4gethostname(2)โ kernel2.0โ Alpha, was available onSPARCup to Linux2.6.26getitimer(2)โ kernel1.0getpeername(2)โ kernel2.0โ See notes onsocketcall(2)getpagesize(2)โ kernel2.0โ Alpha,SPARC/SPARC64onlygetpgid(2)โ kernel1.0getpgrp(2)โ kernel1.0getpid(2)โ kernel1.0getppid(2)โ kernel1.0getpriority(2)โ kernel1.0getrandom(2)โ kernel3.17getresgid(2)โ kernel2.2getresgid32(2)โ kernel2.4getresuid(2)โ kernel2.2getresuid32(2)โ kernel2.4getrlimit(2)โ kernel1.0getrusage(2)โ kernel1.0getsid(2)โ kernel2.0getsockname(2)โ kernel2.0โ See notes onsocketcall(2)getsockopt(2)โ kernel2.0โ See notes onsocketcall(2)gettid(2)โ kernel2.4.11gettimeofday(2)โ kernel1.0getuid(2)โ kernel1.0getuid32(2)โ kernel2.4getunwind(2)โ kernel2.4.8โIA-64only; deprecatedgetxattr(2)โ kernel2.6; 2.4.18getxgid(2)โ kernel2.0โ Alpha only; see NOTESgetxpid(2)โ kernel2.0โ Alpha only; see NOTESgetxuid(2)โ kernel2.0โ Alpha only; see NOTESinit_module(2)โ kernel1.0inotify_add_watch(2)โ kernel2.6.13inotify_init(2)โ kernel2.6.13inotify_init1(2)โ kernel2.6.27inotify_rm_watch(2)โ kernel2.6.13io_cancel(2)โ kernel2.6io_destroy(2)โ kernel2.6io_getevents(2)โ kernel2.6io_pgetevents(2)โ kernel4.18io_setup(2)โ kernel2.6io_submit(2)โ kernel2.6io_uring_enter(2)โ kernel5.1io_uring_register(2)โ kernel5.1io_uring_setup(2)โ kernel5.1ioctl(2)โ kernel1.0ioperm(2)โ kernel1.0iopl(2)โ kernel1.0ioprio_get(2)โ kernel2.6.13ioprio_set(2)โ kernel2.6.13ipc(2)โ kernel1.0kcmp(2)โ kernel3.5kern_features(2)โ kernel3.7โSPARC64onlykexec_file_load(2)โ kernel3.17kexec_load(2)โ kernel2.6.13keyctl(2)โ kernel2.6.10kill(2)โ kernel1.0landlock_add_rule(2)โ kernel5.13landlock_create_ruleset(2)โ kernel5.13landlock_restrict_self(2)โ kernel5.13lchown(2)โ kernel1.0โ Seechown(2)for version detailslchown32(2)โ kernel2.4lgetxattr(2)โ kernel2.6; 2.4.18link(2)โ kernel1.0linkat(2)โ kernel2.6.16listen(2)โ kernel2.0โ See notes onsocketcall(2)listxattr(2)โ kernel2.6; 2.4.18llistxattr(2)โ kernel2.6; 2.4.18lookup_dcookie(2)โ kernel2.6lremovexattr(2)โ kernel2.6; 2.4.18lseek(2)โ kernel1.0lsetxattr(2)โ kernel2.6; 2.4.18lstat(2)โ kernel1.0lstat64(2)โ kernel2.4madvise(2)โ kernel2.4mbind(2)โ kernel2.6.6memory_ordering(2)โ kernel2.2โSPARC64onlymembarrier(2)โ kernel3.17memfd_create(2)โ kernel3.17memfd_secret(2)โ kernel5.14migrate_pages(2)โ kernel2.6.16mincore(2)โ kernel2.4mkdir(2)โ kernel1.0mkdirat(2)โ kernel2.6.16mknod(2)โ kernel1.0mknodat(2)โ kernel2.6.16mlock(2)โ kernel2.0mlock2(2)โ kernel4.4mlockall(2)โ kernel2.0mmap(2)โ kernel1.0mmap2(2)โ kernel2.4modify_ldt(2)โ kernel1.0mount(2)โ kernel1.0move_mount(2)โ kernel5.2move_pages(2)โ kernel2.6.18mprotect(2)โ kernel1.0mq_getsetattr(2)โ kernel2.6.6mq_notify(2)โ kernel2.6.6mq_open(2)โ kernel2.6.6mq_timedreceive(2)โ kernel2.6.6mq_timedsend(2)โ kernel2.6.6mq_unlink(2)โ kernel2.6.6mremap(2)โ kernel2.0msgctl(2)โ kernel2.0โ See notes onipc(2)msgget(2)โ kernel2.0โ See notes onipc(2)msgrcv(2)โ kernel2.0โ See notes onipc(2)msgsnd(2)โ kernel2.0โ See notes onipc(2)msync(2)โ kernel2.0munlock(2)โ kernel2.0munlockall(2)โ kernel2.0munmap(2)โ kernel1.0name_to_handle_at(2)โ kernel2.6.39nanosleep(2)โ kernel2.0newfstatat(2)โ kernel2.6.16โ Seestat(2)nfsservctl(2)โ kernel2.2โ Removed in3.1nice(2)โ kernel1.0old_adjtimex(2)โ kernel2.0โ Alpha only; see NOTESold_getrlimit(2)โ kernel2.4โ Old variant ofgetrlimit(2)that used a different value forRLIM_INFINITYoldfstat(2)โ kernel1.0oldlstat(2)โ kernel1.0oldolduname(2)โ kernel1.0oldstat(2)โ kernel1.0oldumount(2)โ 2.4.116 ยท this is just the name the oldumount(2)syscall goes by on Alpha ๐ฆolduname(2)โ 1.0open(2)โ 1.0 โจopen_by_handle_at(2)โ 2.6.39open_tree(2)โ 5.2openat(2)โ 2.6.16openat2(2)โ 5.6or1k_atomic(2)โ 3.1 ยท OpenRISC 1000 only, bestie ๐ธpause(2)โ 1.0pciconfig_iobase(2)โ 2.2.15; 2.4 ยท literally not on x86pciconfig_read(2)โ 2.0.26; 2.2 ยท also not on x86pciconfig_write(2)โ 2.0.26; 2.2 ยท yeah, not on x86 either ๐ซperf_event_open(2)โ 2.6.31 ยท it was calledperf_counter_open()back in 2.6.31, then got renamed in 2.6.32personality(2)โ 1.2perfctr(2)โ 2.2 ยท SPARC only, and it got removed in 2.6.34 ๐perfmonctl(2)โ 2.4 ยท IA-64 only, removed in 5.10pidfd_getfd(2)โ 5.6pidfd_send_signal(2)โ 5.1pidfd_open(2)โ 5.3pipe(2)โ 1.0pipe2(2)โ 2.6.27pivot_root(2)โ 2.4pkey_alloc(2)โ 4.8pkey_free(2)โ 4.8pkey_mprotect(2)โ 4.8poll(2)โ 2.0.36; 2.2ppoll(2)โ 2.6.16prctl(2)โ 2.2pread64(2)โ no version column for this one ยท it was added aspreadin 2.2 and got renamedpread64in 2.6preadv(2)โ 2.6.30preadv2(2)โ 4.6prlimit64(2)โ 2.6.36process_madvise(2)โ 5.10process_vm_readv(2)โ 3.2process_vm_writev(2)โ 3.2pselect6(2)โ 2.6.16ptrace(2)โ 1.0pwrite64(2)โ no version column here either ยท added aspwritein 2.2, renamedpwrite64in 2.6pwritev(2)โ 2.6.30pwritev2(2)โ 4.6query_module(2)โ 2.2 ยท removed in 2.6, rip ๐quotactl(2)โ 1.0quotactl_fd(2)โ 5.14read(2)โ 1.0readahead(2)โ 2.4.13readdir(2)โ 1.0readlink(2)โ 1.0readlinkat(2)โ 2.6.16readv(2)โ 2.0reboot(2)โ 1.0recv(2)โ 2.0 ยท see the notes onsocketcall(2)recvfrom(2)โ 2.0 ยท see the notes onsocketcall(2)recvmsg(2)โ 2.0 ยท see the notes onsocketcall(2)recvmmsg(2)โ 2.6.33remap_file_pages(2)โ 2.6 ยท deprecated since 3.16, so maybe don't โจremovexattr(2)โ 2.6; 2.4.18rename(2)โ 1.0renameat(2)โ 2.6.16renameat2(2)โ 3.15request_key(2)โ 2.6.10restart_syscall(2)โ 2.6riscv_flush_icache(2)โ 4.15 ยท RISC-V onlyrmdir(2)โ 1.0rseq(2)โ 4.18rt_sigaction(2)โ 2.2rt_sigpending(2)โ 2.2rt_sigprocmask(2)โ 2.2rt_sigqueueinfo(2)โ 2.2rt_sigreturn(2)โ 2.2rt_sigsuspend(2)โ 2.2rt_sigtimedwait(2)โ 2.2rt_tgsigqueueinfo(2)โ 2.6.31rtas(2)โ 2.6.2 ยท PowerPC/PowerPC64 onlys390_runtime_instr(2)โ 3.7 ยท s390 onlys390_pci_mmio_read(2)โ 3.19 ยท s390 onlys390_pci_mmio_write(2)โ 3.19 ยท s390 onlys390_sthyi(2)โ 4.15 ยท s390 onlys390_guarded_storage(2)โ 4.12 ยท s390 onlysched_get_affinity(2)โ 2.6 ยท this is the namesched_getaffinity(2)goes by on SPARC and SPARC64sched_get_priority_max(2)โ 2.0sched_get_priority_min(2)โ 2.0sched_getaffinity(2)โ 2.6sched_getattr(2)โ 3.14sched_getparam(2)โ 2.0sched_getscheduler(2)โ 2.0sched_rr_get_interval(2)โ 2.0sched_set_affinity(2)โ 2.6 ยท and this is the namesched_setaffinity(2)goes by on SPARC and SPARC64sched_setaffinity(2)โ 2.6sched_setattr(2)โ 3.14sched_setparam(2)โ 2.0sched_setscheduler(2)โ 2.0sched_yield(2)โ 2.0seccomp(2)โ 3.17select(2)โ 1.0semctl(2)โ 2.0 ยท see the notes onipc(2)semget(2)โ 2.0 ยท see the notes onipc(2)semop(2)โ 2.0 ยท see the notes onipc(2)semtimedop(2)โ 2.6; 2.4.22send(2)โ 2.0 ยท see the notes onsocketcall(2)sendfile(2)โ 2.2sendfile64(2)โ 2.6; 2.4.19sendmmsg(2)โ 3.0sendmsg(2)โ 2.0 ยท see the notes onsocketcall(2)sendto(2)โ 2.0 ยท see the notes onsocketcall(2)set_mempolicy(2)โ 2.6.6set_robust_list(2)โ 2.6.17set_thread_area(2)โ 2.6set_tid_address(2)โ 2.6set_tls(2)โ 2.6.11 ยท ARM OABI/EABI only (the constant has the__ARM_NRprefix)setdomainname(2)โ 1.0setfsgid(2)โ 1.2setfsgid32(2)โ 2.4setfsuid(2)โ 1.2setfsuid32(2)โ 2.4setgid(2)โ 1.0setgid32(2)โ 2.4setgroups(2)โ 1.0setgroups32(2)โ 2.4sethae(2)โ 2.0 ยท Alpha only, peep the NOTES for this onesethostname(2)โ 1.0setitimer(2)โ 1.0setns(2)โ 3.0setpgid(2)โ 1.0setpgrp(2)โ 2.0 ยท an alternative name forsetpgid(2)on Alphasetpriority(2)โ 1.0setregid(2)โ 1.0setregid32(2)โ 2.4setresgid(2)โ 2.2setresgid32(2)โ 2.4setresuid(2)โ 2.2setresuid32(2)โ 2.4setreuid(2)โ 1.0setreuid32(2)โ 2.4setrlimit(2)โ 1.0setsid(2)โ 1.0setsockopt(2)โ 2.0 ยท see the notes onsocketcall(2)settimeofday(2)โ 1.0setuid(2)โ 1.0setuid32(2)โ 2.4setup(2)โ 1.0 ยท removed in 2.2 ๐setxattr(2)โ 2.6; 2.4.18sgetmask(2)โ 1.0shmat(2)โ 2.0 ยท see the notes onipc(2)shmctl(2)โ 2.0 ยท see the notes onipc(2)shmdt(2)โ 2.0 ยท see the notes onipc(2)shmget(2)โ 2.0 ยท see the notes onipc(2)shutdown(2)โ 2.0 ยท see the notes onsocketcall(2)sigaction(2)โ 1.0sigaltstack(2)โ 2.2signal(2)โ 1.0signalfd(2)โ 2.6.22signalfd4(2)โ 2.6.27sigpending(2)โ 1.0sigprocmask(2)โ 1.0sigreturn(2)โ 1.0sigsuspend(2)โ 1.0socket(2)โ 2.0 ยท see the notes onsocketcall(2)socketcall(2)โ 1.0socketpair(2)โ 2.0 ยท see the notes onsocketcall(2)spill(2)โ 2.6.13 ยท Xtensa onlysplice(2)โ 2.6.17spu_create(2)โ 2.6.16 ยท PowerPC/PowerPC64 onlyspu_run(2)โ 2.6.16 ยท PowerPC/PowerPC64 onlyssetmask(2)โ 1.0stat(2)โ 1.0stat64(2)โ 2.4statfs(2)โ 1.0statfs64(2)โ 2.6statx(2)โ 4.11stime(2)โ 1.0subpage_prot(2)โ 2.6.25 ยท PowerPC/PowerPC64 onlyswapcontext(2)โ 2.6.3 ยท PowerPC/PowerPC64 onlyswitch_endian(2)โ 4.1 ยท PowerPC64 onlyswapoff(2)โ 1.0swapon(2)โ 1.0symlink(2)โ 1.0symlinkat(2)โ 2.6.16sync(2)โ 1.0sync_file_range(2)โ 2.6.17sync_file_range2(2)โ 2.6.22syncfs(2)โ 2.6.39sys_debug_setcontext(2)โ 2.6.11 ยท PowerPC onlysyscall(2)โ 1.0 ยท still available on ARM OABI and MIPS O32 ABI, iconic behavior โจsysfs(2)โ 1.2sysinfo(2)โ 1.0syslog(2)โ 1.0sysmips(2)โ 2.6.0 ยท MIPS onlytee(2)โ 2.6.17tgkill(2)โ 2.6time(2)โ 1.0timer_create(2)โ 2.6timer_delete(2)โ 2.6timer_getoverrun(2)โ 2.6timer_gettime(2)โ 2.6timer_settime(2)โ 2.6timerfd_create(2)โ 2.6.25timerfd_gettime(2)โ 2.6.25timerfd_settime(2)โ 2.6.25times(2)โ 1.0tkill(2)โ 2.6; 2.4.22truncate(2)โ 1.0truncate64(2)โ 2.4ugetrlimit(2)โ 2.4umask(2)โ 1.0umount(2)โ 1.0umount2(2)โ 2.2uname(2)โ 1.0unlink(2)โ 1.0unlinkat(2)โ 2.6.16unshare(2)โ 2.6.16uselib(2)โ 1.0ustat(2)โ 1.0userfaultfd(2)โ 4.3usr26(2)โ 2.4.8.1 ยท ARM OABI onlyusr32(2)โ 2.4.8.1 ยท ARM OABI onlyutime(2)โ 1.0utimensat(2)โ 2.6.22utimes(2)โ 2.2utrap_install(2)โ 2.2 ยท SPARC64 onlyvfork(2)โ 2.2vhangup(2)โ 1.0vm86old(2)โ 1.0 ยท this one was justvm86and got renamed in 2.0.28/2.2vm86(2)โ 2.0.28; 2.2vmsplice(2)โ 2.6.17wait4(2)โ 1.0waitid(2)โ 2.6.10waitpid(2)โ 1.0write(2)โ 1.0writev(2)โ 2.0xtensa(2)โ 2.6.13 ยท Xtensa only
okay so one last thing before we move on, bestie, because it's important and it's giving "plot twist" ๐
On a bunch of platforms โ x86-32 included โ all the socket calls are multiplexed (through glibc wrapper functions, no less) via socketcall(2). And in the same way, the System V IPC calls are multiplexed through ipc(2). So when you see "see the notes on socketcall(2)" or "see the notes on ipc(2)" up there, that's the whole tea ๐ซโจ
okay so real talk: the kernel's system call table has slots reserved for a whole bunch of calls that just... never showed up. They're in the table, bestie, but they are not implemented in the standard kernel:
afs_syscall(2)break(2)ftime(2)getpmsg(2)gtty(2)idle(2)lock(2)madvise1(2)mpx(2)phys(2)prof(2)profil(2)putpmsg(2)security(2)stty(2)tuxcall(2)ulimit(2)vserver(2)
(also see unimplemented(2) โ it's giving "the graveyard, but make it documentation" ๐ชฆ)
BUT plot twist: ftime(3), profil(3), and ulimit(3) do exist as library routines, so you're not fully abandoned. ๐ซถ
The slot for phys(2) is in use since Linux 2.1.116 โ it got taken over by umount(2), and phys(2) will never be implemented. Periodt. The getpmsg(2) and putpmsg(2) calls are for kernels patched to support STREAMS, and they may never be in the standard kernel either. ๐
There was briefly set_zone_reclaim(2), added in Linux 2.6.13 and removed in Linux 2.6.16 โ this system call was never available to user space. It was a whole main character for like five minutes. ๐
โจ System calls on removed ports โจ
Some system calls only ever existed on Linux architectures that have since been removed from the kernel. Like, gone gone. ๐ฆ
Blackfin (port removed in Linux 4.17)
bfin_spinlock(2)(added in Linux 2.6.22)dma_memcpy(2)(added in Linux 2.6.22)sram_alloc(2)(added in Linux 2.6.22)sram_free(2)(added in Linux 2.6.22)
Metag (port removed in Linux 4.17)
metag_get_tls(2)(added in Linux 3.9)metag_set_fpu_flags(2)(added in Linux 3.9)metag_set_tls(2)(added in Linux 3.9)metag_setglobalbit(2)(added in Linux 3.9)
Tile (port removed in Linux 4.17)
cmpxchg_badaddr(2)(added in Linux 2.6.36)
๐ NOTES ๐
Roughly speaking (roughly, babes, don't come for me), the code belonging to the system call with number __NR_xxx defined in /usr/include/asm/unistd.h can be found in the Linux kernel source in the routine sys_xxx(). There are many exceptions, however โ mostly because older system calls were superseded by newer ones, and this has been treated somewhat unsystematically. ikr. ๐ญ On platforms with proprietary operating-system emulation, such as sparc, sparc64, and alpha, there are many additional system calls; mips64 also contains a full set of 32-bit system calls.
Over time, changes to the interfaces of some system calls have been necessary. One reason for such changes was the need to increase the size of structures or scalar values passed to the system call. Because of these changes, certain architectures (notably, longstanding 32-bit architectures such as i386) now have various groups of related system calls (e.g., truncate(2) and truncate64(2)) which perform similar tasks, but which vary in details such as the size of their arguments. (As noted earlier, applications are generally unaware of this: the glibc wrapper functions do some work to ensure that the right system call is invoked, and that ABI compatibility is preserved for old binaries.) ๐
Examples of system calls that exist in multiple versions are the following:
- By now there are three different versions of
stat(2):sys_stat()(slot__NR_oldstat),sys_newstat()(slot__NR_stat), andsys_stat64()(slot__NR_stat64), with the last being the most current. A similar story applies forlstat(2)andfstat(2). - Similarly, the defines
__NR_oldolduname,__NR_olduname, and__NR_unamerefer to the routinessys_olduname(),sys_uname(), andsys_newuname(). - In Linux 2.0, a new version of
vm86(2)appeared, with the old and the new kernel routines being namedsys_vm86old()andsys_vm86(). - In Linux 2.4, a new version of
getrlimit(2)appeared, with the old and the new kernel routines being namedsys_old_getrlimit()(slot__NR_getrlimit) andsys_getrlimit()(slot__NR_ugetrlimit). - Linux 2.4 increased the size of user and group IDs from 16 to 32 bits. To support this change, a range of system calls were added (e.g.,
chown32(2),getuid32(2),getgroups32(2),setresuid32(2)), superseding earlier calls of the same name without the"32"suffix. - Linux 2.4 added support for applications on 32-bit architectures to access large files (i.e., files for which the sizes and file offsets can't be represented in 32 bits). To support this change, replacements were required for system calls that deal with file offsets and sizes. Thus the following system calls were added:
fcntl64(2),getdents64(2),stat64(2),statfs64(2),truncate64(2), and their analogs that work with file descriptors or symbolic links. These system calls supersede the older system calls which, except in the case of the"stat"calls, have the same name without the"64"suffix.
On newer platforms that only have 64-bit file access and 32-bit UIDs/GIDs (e.g., alpha, ia64, s390x, x86-64), there is just a single version of the UID/GID and file access system calls. On platforms (typically, 32-bit platforms) where the *64 and *32 calls exist, the other versions are obsolete.
- The
rt_sig*calls were added in Linux 2.2 to support the addition of real-time signals (seesignal(7)). These system calls supersede the older system calls of the same name without the"rt_"prefix. - The
select(2)andmmap(2)system calls use five or more arguments, which caused problems in the way argument passing on the i386 used to be set up. Thus, while other architectures havesys_select()andsys_mmap()corresponding to__NR_selectand__NR_mmap, on i386 one findsold_select()andold_mmap()(routines that use a pointer to an argument block) instead. These days passing five arguments is not a problem any more, and there is a__NR__newselectthat corresponds directly tosys_select()and similarly__NR_mmap2. s390x is the only 64-bit architecture that hasold_mmap(). the way that history lingers... iconic honestly ๐
๐ฆ Architecture-specific details: Alpha ๐ฆ
getxgid(2)โ returns a pair of GID and effective GID via registersr0andr20; it is provided instead ofgetgid(2)andgetegid(2). two for one, we love efficiency โจgetxpid(2)โ returns a pair of PID and parent PID via registersr0andr20; it is provided instead ofgetpid(2)andgetppid(2).old_adjtimex(2)โ is a variant ofadjtimex(2)that usesstruct timeval32, for compatibility with OSF/1.getxuid(2)โ returns a pair of UID and effective UID via registersr0andr20; it is provided instead ofgetuid(2)andgeteuid(2).sethae(2)โ is used for configuring the Host Address Extension register on low-cost Alphas in order to access address space beyond first 27 bits.
๐ SEE ALSO ๐
and that's a wrap on the whole page, bestie!! ๐ This one's from Linux man-pages 6.20, dated 2026-02-08 โ go forth and syscall responsibly, mwah ๐๐ธ๐ซถ
๐ฆ where this page comes from
- arch rolling: man-pages 6.20-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- ๐ the page's license: Linux-man-pages-copyleft
- Copyright 1998, Andries E. Brouwer <aeb@cwi.nl>
- Copyright 2002, Ian Redfern <redferni@logica.com>
- Copyright 2007, Michael Kerrisk <mtk.manpages@gmail.com>
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms