pinoutPrints a diagram of the 40-pin header for the board you are on (from python3-gpiozero).
Reading and driving Raspberry Pi GPIO pins from the shell using pinctrl and the libgpiod utilities (gpiodetect, gpioget, gpioset).
sudo apt install gpiodpinoutPrints a diagram of the 40-pin header for the board you are on (from python3-gpiozero).
gpiodetectLists GPIO chips. On a Pi 5 the header is on gpiochip4 (or a chip labelled pinctrl-rp1); on earlier models gpiochip0.
gpioinfoEvery line on every chip with its name, direction and whether it is in use.
gpiofind <name>Finds the chip and offset for a named line (libgpiod 1.x).
Example
gpiofind GPIO17gpioget <chip> <line>Reads the current value of a line (1.x syntax; in 2.x use gpioget -c gpiochip0 17).
Example
gpioget gpiochip0 17gpioset <chip> <line>=<value>Drives a line high. In libgpiod 2.x gpioset keeps running to hold the value until you stop it.
Example
gpioset gpiochip0 17=1gpiomon <chip> <line>Waits for and prints edge events, such as a button press.
Example
gpiomon gpiochip0 27gpioget -B pull-up <chip> <line>Enables the internal pull-up resistor while reading.
Example
gpioget -B pull-up gpiochip0 22pinctrl getState of every pin: function, direction, pull and level.
pinctrl get <pin>State of one pin.
Example
pinctrl get 17pinctrl set <pin> op dhSets a pin as an output driving high; dl drives low.
Example
pinctrl set 17 op dhpinctrl set <pin> ip puSets a pin as an input with pull-up.
Example
pinctrl set 22 ip pupinctrl funcs <pin>Lists the alternate functions a pin supports (UART, SPI, I²C…).
Example
pinctrl funcs 14python3 -c "from gpiozero import LED; from time import sleep; l=LED(17); l.on(); sleep(1); l.off()"Blinks an LED on GPIO17 once using gpiozero.
Utilities to detect, read and write devices on an I²C bus: i2cdetect, i2cget, i2cset and i2cdump.
The Raspberry Pi configuration tool, interactive or scriptable: enable interfaces, set locale, expand storage and tune boot options.
Queries the Raspberry Pi’s VideoCore firmware: temperature, clock speeds, voltages, throttling state and memory split.