18

How to check which Byte Order my system is Using ?

Little Endian OR Big Endian ?

1

2 Answers 2

24

Byte Order can be checked by viewing the information about CPU.

Run this command,

lscpu | grep "Byte Order"

You will get to know your Byte Order.

1
  • 2
    There is no need to use sudo ;)
    – Ravexina
    Apr 9, 2017 at 16:33
9

You can also use Python:

python -c "import sys; print(sys.byteorder)"

It will print either little or big.

2
  • please change python to python2
    – diralik
    Jan 19, 2019 at 11:34
  • Or just make it version independent by adding parentheses: print(sys.byteorder)
    – Kyle
    Jul 8, 2019 at 14:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .