syscall.sh / x64 / sethostname

sethostname

get/set hostname

sys_sethostname(char *name, int len)
number170 (0xaa)
abicommon
entry pointsys_sethostname
sinceLinux 3.3
man pagesethostname(2)
sourceelixir.bootlin.com

Registers

registervalue
rax170, the syscall number
rdichar *name
rsiint len
raxthe return value

Then run syscall to enter the kernel.

Same syscall on other architectures

Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/sethostname