SETARCH(8)

๐Ÿ’– SETARCH โ€” bestie edition ๐Ÿ’–

okay so. setarch is a manual page in section 8 (system administration, the big-kid section ๐Ÿ’…). What does it do? It changes the reported architecture in a new program environment, and/or sets personality flags. Two-for-one, iconic.


โœจ SYNOPSIS โœจ

setarch [arch] [options] [program [argument...]]

arch [options] [program [argument...]]

๐ŸŒธ DESCRIPTION ๐ŸŒธ

So setarch modifies the execution domain and the process personality flags. Two knobs, one tool, we love that.

The execution domain, rn, only affects the output of uname -m. That's literally it. For example, on an AMD64 system, running setarch i386 program will make program see i686 instead of x86_64 as the machine type. Gaslighting, but legally โœจ. The default program is /bin/sh.

Since version 2.33, the arch command-line argument is optional, and setarch can be used to change personality flags (ADDR_LIMIT_3GB, SHORT_INODE, etc) without modification of the execution domain. So you can vibe with the flags and leave the arch alone. ๐Ÿฆ‹


๐ŸŽ€ OPTIONS ๐ŸŽ€

  • --list โ€” Lists the architectures that setarch knows about. But listen โ€” whether setarch can actually set each of these architectures depends on the running kernel. It knows of them; the kernel decides if they're invited to the party. ๐Ÿ˜ญ
  • --show[=personality] โ€” Shows the currently active personality and flags. If the personality argument is provided, that personality is shown instead of the current one. personality is a hexadecimal number whose possible values are described in sys/personality.h. Numbers, bestie, hex numbers.
  • -p, --pid=pid โ€” When used with --show, show the personality and flags of the specified process. Peeking at someone else's vibe check ๐Ÿ‘€
  • --uname-2.6 โ€” Causes the specified program to see a kernel version number beginning with 2.6. Turns on UNAME26. Blast from the past, fr fr.
  • -v, --verbose โ€” Be verbose. Talkative. Yapping privileges granted. ๐Ÿ—ฃ๏ธ
  • -3, --3gb โ€” The specified program should use a maximum of 3GB of address space. Supported on x86. Turns on ADDR_LIMIT_3GB. Budget era.
  • --4gb โ€” This option has no effect. It is retained for backward compatibility only, and may be removed in future releases. It's giving ghost of options past ๐Ÿ’€
  • -B, --32bit โ€” Limit the address space to 32 bits to emulate hardware. Supported on ARM and Alpha. Turns on ADDR_LIMIT_32BIT.
  • -F, --fdpic-funcptrs โ€” Treat user-space function pointers to signal handlers as pointers to address descriptors. This option has no effect on architectures that do not support FDPIC ELF binaries. In kernel v4.14 support is limited to ARM, Blackfin, Fujitsu FR-V, and SuperH CPU architectures. Very niche, very specific, very cunty of it.
  • -I, --short-inode โ€” Obsolete bug emulation flag. Turns on SHORT_INODE. Retro bug cosplay โœจ
  • -L, --addr-compat-layout โ€” Provide legacy virtual address space layout. Use when the program binary does not have PT_GNU_STACK ELF header. Turns on ADDR_COMPAT_LAYOUT.
  • -R, --addr-no-randomize โ€” Disables randomization of the virtual address space. Turns on ADDR_NO_RANDOMIZE. No more random era, we're going deterministic ๐ŸŽ€
  • -S, --whole-seconds โ€” Obsolete bug emulation flag. Turns on WHOLE_SECONDS. Another one for the bug museum ๐Ÿฆ‹
  • -T, --sticky-timeouts โ€” This makes select(2), pselect(2), and ppoll(2) system calls preserve the timeout value instead of modifying it to reflect the amount of time not slept when interrupted by a signal handler. Use when program depends on this behavior. For more details see the timeout description in select(2) manual page. Turns on STICKY_TIMEOUTS. Sticky. Like a good group chat.
  • -X, --read-implies-exec โ€” If this is set then mmap(2) PROT_READ will also add the PROT_EXEC bit โ€” as expected by legacy x86 binaries. Notice that the ELF loader will automatically set this bit when it encounters a legacy binary. Turns on READ_IMPLIES_EXEC.
  • -Z, --mmap-page-zero โ€” SVr4 bug emulation that will set mmap(2) page zero as read-only. Use when program depends on this behavior, and the source code is not available to be fixed. Turns on MMAP_PAGE_ZERO. Ancient lore, but make it read-only.
  • -h, --help โ€” Display help text and exit. Rescue me ๐Ÿซถ
  • -V, --version โ€” Display version and exit. Tell me who you are, king ๐Ÿ‘‘

๐Ÿ”ฅ EXAMPLES ๐Ÿ”ฅ

setarch --addr-no-randomize mytestprog
setarch ppc32 rpmbuild --target=ppc --rebuild foo.src.rpm
setarch ppc32 -vL3 rpmbuild --target=ppc --rebuild bar.src.rpm
setarch ppc32 --32bit rpmbuild --target=ppc --rebuild foo.src.rpm
setarch --show
setarch --show=$(cat /proc/9284/personality)
setarch --show --pid 9284

look at those. ate and left no crumbs ๐Ÿ’…


๐Ÿ‘‘ AUTHORS ๐Ÿ‘‘

Elliot Lee <sopwith@redhat.com>, Jindrich Novy <jnovy@redhat.com>, Karel Zak <kzak@redhat.com>

the founding mothers, lowkey. legends only ๐Ÿซถ


๐ŸŒˆ SEE ALSO ๐ŸŒˆ

personality(2), select(2) *proc_pid_personality(5)

go read those next bestie, iykyk ๐Ÿ“š


๐Ÿ™ˆ REPORTING BUGS ๐Ÿ™ˆ

For bug reports, use the issue tracker <https://github.com/util-linux/util-linux/issues>.

found a bug? don't be shy, tell the tracker, not me ๐Ÿ˜ญ


๐Ÿ’œ AVAILABILITY ๐Ÿ’œ

The setarch command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.


and that's the whole vibe check, bestie. this page came to you courtesy of util-linux 2.42.4, dated 2026-09-21, living its life as SETARCH(8). slay, stay safe, and always check your personality flags before you go ๐Ÿ’…โœจ

๐Ÿ“ฆ where this page comes from
  • arch rolling: util-linux 2.42.4-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND ISC AND LGPL-2.1-or-later AND LicenseRef-PublicDomain
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms