---
name: "get_machine"
section: "1"
platform: "linux"
package: "mescc-tools"
version: "1.5.2-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/get_machine"
---

# get\_machine(1)

identify running hardware architecture

## NAME

get\_machine - identify running hardware architecture

## SYNOPSIS

get\_machine \[ --exact --override OVERRIDE --os \]

## DESCRIPTION

get\_machine exists to make simple shell scripts that need to know that hardware architecture it is assuming or what host operating system is being used.\

At its core is figure out the general hardware architecture and return it as quickly as possible. Although it is sometimes useful to return something different; which is why --override exists and thus what ever is supplied by with it is returned. Scripts that wish to expose that can leverage the environment variable GET\_MACHINE\_FLAGS to allow efficient overriding in their scripts. Or if they wish to only override what Operating system is running the environment variable GET\_MACHINE\_OS\_FLAGS should be used.\
 If one wishes for something more exact than x86 or amd64, the option --exact will return more specific values like i686-pae.\
 Should one desire to know the host operating system: --os\
 A word of warning; --override always will take top precedence and can return anything you desire.

## EXAMPLES

Typically, get\_machine will be in scripts used in bootstrapping\
 \# get\_machine\
 \# get\_machine --override "I am the very model of a modern major general"\
 \# get\_machine ${GET\_MACHINE\_FLAGS}\
 \# get\_machine ${GET\_MACHINE\_OS\_FLAGS} --os\

## COMPATIBILITY

get\_machine is compatible with all Turing complete machines; even the ones that try to be Turing complete -1

## AUTHORS

Jeremiah Orians \<Jeremiah@pdp10.guru\>

## COPYRIGHT

Copyright 2016-2021 Jeremiah Orians \<Jeremiah@pdp10.guru\>\
 License GPLv3+.

## SEE ALSO

[M1(1)](/M1/1.md), [hex2(1)](/hex2/1.md), [blood-elf(1)](/blood-elf/1.md), [kaem(1)](/kaem/1.md), [syscalls(2)](/syscalls/2.md)
