I have Debian and Ubuntu running on two separate Raspberry Pi 4 8GB. As these are not your usual Raspbian OS
, they didn’t come with vcgencmd
binaries. Understandably, I received the following error when I tried to measure temperature on my Raspberry Pi 4.
sudo vcgencmd measure_temp sudo: vcgencmd: command not found
Now, vcgencmd
is part of the libraspberrypi-bin
package. You can use the following command to check apt policy for it.
sudo apt-cache policy libraspberrypi-bin libraspberrypi-bin: Installed: 0~20200520+git2fe4ca3-0ubuntu3~20.04 Candidate: 0~20200520+git2fe4ca3-0ubuntu3~20.04 Version table: *** 0~20200520+git2fe4ca3-0ubuntu3~20.04 500 500 http://ports.ubuntu.com/ubuntu-ports focal-updates/universe arm64 Packages 100 /var/lib/dpkg/status
Install vcgencmd
Simply as a pie
sudo apt-get install libraspberrypi-bin Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libraspberrypi0 Suggested packages: libgps-dev The following NEW packages will be installed: libraspberrypi-bin libraspberrypi0 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 454 kB of archives. After this operation, 1,739 kB of additional disk space will be used. Do you want to continue? [Y/n] y
Run vcgencmd
You can run the following command to measure temperature on a Raspberry Pi.
sudo vcgencmd measure_temp temp=50.1'C
More here