1

When I login as root user into my Raspberry Pi, then I query for temperature using this command:

pi@raspberrypi ~ $ /sys/class/thermal/thermal_zone0/mode

-bash: /sys/class/thermal/thermal_zone0/mode: Permission denied

I think I've broken down something. How can I repair?

1 Answer 1

3

You are attempting to execute that file which is not possible.

You want to view the content of the file which you can do like this:

$ cat /sys/class/thermal/thermal_zone0/mode 

And if you want the temperature:

$ cat /sys/class/thermal/thermal_zone0/temp

You need the divide the number you get by 1000 to get degrees C

2
  • Divide by what?
    – Fred
    Apr 18, 2014 at 14:31
  • @Fred Odd, somehow that got cut. I edited the answer.
    – Craig
    Apr 18, 2014 at 14:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.