In this post you’ll find a list of handy tips, tricks, and commands for your new Raspberry Pi 4.
I’ve been maintaining a document to record these so I can search and re-use them, and figured I’d share them on the blog for others to use as well.
I’m hoping to target both Raspbian and Ubuntu Server for the Raspberry Pi 4. If you have any feedback or input, please leave a comment!
Enable 64-Bit Kernel on Raspbian
Enables 64-bit kernel on Raspbian, however remember that the userspace is still 32-bit.
- Run “rpi-update” to make sure you’re running latest firmware and kernel.
rpi-update
- Add “arm_64bit=1” to “/boot/config.txt”
sudo echo arm_64bit=1 >> /boot/config.txt
- Restart
Remove, comment out, or set the value to 0 to go back to a 32-bit kernel.
Get CPU Temperature on Raspbian
Run the command “sudo vcgencmd measure_temp” to get the CPU temperature on Raspbian.
pi@raspberrypi:~ $ sudo vcgencmd measure_temp temp=38.0'C
Get CPU Temperature on Ubuntu Server
Run the command “paste <(cat /sys/class/thermal/thermal_zone/type) <(cat /sys/class/thermal/thermal_zone/temp) | column -s $’\t’ -t | sed ‘s/(.)..$/.\1°C/'” as root to get the CPU temperature on Ubuntu Server.
root@ubuntu:~# paste <(cat /sys/class/thermal/thermal_zone/type) <(cat /sys/class/thermal/thermal_zone/temp) | column -s $'\t' -t | sed 's/(.)..$/.\1°C/' cpu-thermal 45.2°C
Add root CA (Certification Authority) certificates to the trust on Raspbian and Ubuntu Server
To add a root CA to your CA trust on your Linux instance, perform the following:
- Save your certificate as a friendly-filename.crt (CRT extension is important) and copy to “/usr/local/share/ca-certificates/”.
- Run the “update-ca-certificates” command as root or sudo.
update-ca-certificates
Install Cockpit Remote Web Administration
To install cockpit on your Raspberry Pi, run the following command as root or sudo:
apt install cockpit
After this, login to Cockpit on your Pi by pointring your browser to https://PI-IP-ADDRESS:9090
To install the Target CLI to configure the iSCSI Target
In order to configure the Linux kernel iSCSI target, you need the “targetcli” application/binary.
To install on Raspbian, run the command as root or sudo:
apt install targetcli
To install on Ubuntu Server, run the command as root or sudo:
apt install targetcli-fb
[…] And don’t forget to check out these Handy Tips, Tricks, and Commands for the Raspberry Pi 4! […]