bash: /usr/bin/ls: cannot execute binary file: Exec format error

Viewed 62

I am using a web terminal ubuntu 20.04 to learn shell and everything was working fine. suddenly I started getting this error message when I invoked the ls command when I tried listing my current directory it came up with the error message bellow

bash: /usr/bin/ls: cannot execute binary file: Exec format error

1 Answers

Well, this means something is wrong with the file /usr/bin/ls , like it is for a different computer "architecture".

Investigate when ls worked previously for you, go back to that and see what the location of the ls executable was that worked. Use which command to find the location.

If this does not point you in the right direction, you need to give more details - start from the point when ls is working and then give all the steps you are doing until it stops working.

Related