From 5a3c4ad08187298ee1bc9107d6d459e8fc55ee46 Mon Sep 17 00:00:00 2001 From: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com> Date: Sun, 25 May 2025 14:03:03 +0200 Subject: [PATCH] setarch: add page (#16598) * setarch: add page * Update setarch.md Co-authored-by: Wiktor Perskawiec --------- Co-authored-by: Wiktor Perskawiec --- pages/linux/setarch.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 pages/linux/setarch.md diff --git a/pages/linux/setarch.md b/pages/linux/setarch.md new file mode 100644 index 0000000000..e981b7bfac --- /dev/null +++ b/pages/linux/setarch.md @@ -0,0 +1,25 @@ +# setarch + +> Change the reported architecture for a program's execution, primarily used to modify how programs behave based on system architecture. +> Useful for compatibility testing or running legacy applications. +> More information: . + +- Run a command as if the machine architecture is `i686` (useful for running 32-bit apps on a 64-bit kernel): + +`setarch i686 {{command}}` + +- Run a shell with the `x86_64` architecture: + +`setarch x86_64 {{bash}}` + +- Disable randomization of the virtual address space: + +`setarch {{linux32}} {{[-R|--addr-no-randomize]}} {{command}}` + +- List supported architectures: + +`setarch --list` + +- Display help: + +`setarch {{[-h|--help]}}`