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 thatsetarchknows about. But listen โ whethersetarchcan 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 insys/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 with2.6. Turns onUNAME26. 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 onADDR_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 onADDR_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 onSHORT_INODE. Retro bug cosplay โจ-L,--addr-compat-layoutโ Provide legacy virtual address space layout. Use when the program binary does not havePT_GNU_STACKELF header. Turns onADDR_COMPAT_LAYOUT.-R,--addr-no-randomizeโ Disables randomization of the virtual address space. Turns onADDR_NO_RANDOMIZE. No more random era, we're going deterministic ๐-S,--whole-secondsโ Obsolete bug emulation flag. Turns onWHOLE_SECONDS. Another one for the bug museum ๐ฆ-T,--sticky-timeoutsโ This makesselect(2),pselect(2), andppoll(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 inselect(2)manual page. Turns onSTICKY_TIMEOUTS. Sticky. Like a good group chat.-X,--read-implies-execโ If this is set thenmmap(2)PROT_READwill also add thePROT_EXECbit โ as expected by legacy x86 binaries. Notice that the ELF loader will automatically set this bit when it encounters a legacy binary. Turns onREAD_IMPLIES_EXEC.-Z,--mmap-page-zeroโ SVr4 bug emulation that will setmmap(2)page zero as read-only. Use when program depends on this behavior, and the source code is not available to be fixed. Turns onMMAP_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