Linux系统调用是操作系统提供给用户程序的一组接口,允许用户程序请求操作系统提供的服务,如文件操作、进程管理等。每个系统调用都有一个唯一的编号,即系统调用号,用于标识该系统调用。
以下是Linux系统调用号的列表,这些信息通常可以在/usr/include/asm/unistd.h
文件中找到:
__NR_restart_syscall
:0__NR_exit
:1__NR_fork
:2__NR_read
:3__NR_write
:4__NR_open
:5__NR_close
:6__NR_waitpid
:7__NR_creat
:8__NR_link
:9__NR_unlink
:10__NR_execve
:11__NR_chdir
:12__NR_time
:13__NR_mknod
:14__NR_chmod
:15__NR_lchown
:16__NR_break
:17__NR_oldstat
:18__NR_lseek
:19__NR_getpid
:20__NR_mount
:21__NR_umount
:22__NR_setuid
:23__NR_getuid
:24__NR_stime
:25__NR_ptrace
:26__NR_alarm
:27__NR_oldfstat
:28__NR_pause
:29__NR_utime
:30__NR_stty
:31__NR_gtty
:32__NR_access
:33__NR_nice
:34__NR_ftime
:35__NR_sync
:36__NR_kill
:37__NR_rename
:38__NR_mkdir
:39__NR_rmdir
:40__NR_dup
:41__NR_pipe
:42__NR_times
:43__NR_prof
:44__NR_brk
:45__NR_setgid
:46__NR_getgid
:47__NR_signal
:48__NR_geteuid
:49__NR_getegid
:50__NR_acct
:51__NR_umount2
:52__NR_lock
:53__NR_ioctl
:54__NR_fcntl
:55__NR_mpx
:56__NR_setpgid
:57__NR_ulimit
:58__NR_oldolduname
:59__NR_umask
:60__NR_chroot
:61__NR_ustat
:62__NR_dup2
:63__NR_getppid
:64__NR_getpgrp
:65__NR_setsid
:66__NR_sigaction
:67__NR_sgetmask
:68__NR_ssetmask
:69__NR_setreuid
:70__NR_setregid
:71__NR_sigsuspend
:72__NR_sigpending
:73__NR_sethostname
:74__NR_setrlimit
:75__NR_getrlimit
:76__NR_getrusage
:77__NR_gettimeofday
:78__NR_settimeofday
:79__NR_getgroups
:80__NR_setgroups
:81__NR_select
:82__NR_symlink
:83__NR_oldlstat
:84__NR_readlink
:85__NR_uselib
:86__NR_swapon
:87__NR_reboot
:88__NR_readdir
:89__NR_mmap
:90__NR_munmap
:91__NR_truncate
:92__NR_ftruncate
:93__NR_fchmod
:94__NR_fchown
:95__NR_getpriority
:96__NR_setpriority
:97__NR_profil
:98__NR_statfs
:99__NR_fstatfs
:100__NR_ioperm
:101__NR_socketcall
:102__NR_syslog
:103__NR_setitimer
:104__NR_getitimer
:105__NR_stat
:106__NR_lstat
:107__NR_fstat
:108__NR_olduname
:109__NR_iopl
:110__NR_vhangup
:111__NR_idle
:112__NR_vm86old
:113请注意,上述列表可能不全面,且随着Linux内核版本的更新,系统调用的数量和种类可能会有所变化。在实际编程中,建议直接包含相应的头文件(如<unistd.h>
),以获取最准确和最新的系统调用号。
领取专属 10元无门槛券
手把手带您无忧上云