LinuxCommandLibrary

personality

TLDR

Set execution domain

$ personality [domain] [command]
copy
Run as Linux 32-bit
$ personality --addr-no-randomize [command]
copy
Show current personality
$ personality
copy
Run with address randomization disabled
$ setarch $(uname -m) -R [command]
copy

SYNOPSIS

personality [options] [command [args]]

DESCRIPTION

personality sets the process execution domain, affecting how the kernel handles the process. Used for compatibility with older programs or debugging.
This is a Linux-specific system call wrapper.

PARAMETERS

ADDR_NO_RANDOMIZE

Disable ASLR.
MMAP_PAGE_ZERO
Map page zero.
ADDR_COMPAT_LAYOUT
Legacy memory layout.
READ_IMPLIES_EXEC
Readable implies executable.

EXAMPLES

$ # Disable ASLR for debugging
setarch $(uname -m) -R gdb ./program

# Run 32-bit binary
linux32 ./old_binary

# Check personality flags
personality
copy

SYSTEM CALL

$ #include <sys/personality.h>

int personality(unsigned long persona);

/* Personality flags */
PER_LINUX       - Standard Linux
PER_LINUX32     - 32-bit mode
ADDR_NO_RANDOMIZE - Disable ASLR
copy

CAVEATS

Linux-specific. Disabling security features for compatibility reduces security. Most users should use setarch instead.

HISTORY

personality(2) is a Linux system call for setting execution domain, dating back to early Linux 2.x for binary compatibility.

SEE ALSO

setarch(8), linux32(8), linux64(8)

Copied to clipboard