Skip to content

Instantly share code, notes, and snippets.

View hfan22's full-sized avatar
👾
I may be slow to respond.

Heather hfan22

👾
I may be slow to respond.
View GitHub Profile
@hfan22
hfan22 / os.sh
Created March 23, 2020 21:27
shell/bash command to determine if the OS architecture is 386, amd64, arm, or arm64?
architecture=""
case $(uname -m) in
i386) architecture="386" ;;
i686) architecture="386" ;;
x86_64) architecture="amd64" ;;
arm) dpkg --print-architecture | grep -q "arm64" && architecture="arm64" || architecture="arm" ;;
esac
-------------------------------------------------------
uname -m