A little bit late, but as can be found here: http://wiringpi.com/download-and-install/ simply type

sudo apt-get install wiringpi

This installs the gpio command.

Answer from Rene on Stack Exchange
🌐
Raspberry Pi Forums
forums.raspberrypi.com › board index › community › general discussion
bash: gpio: command not found - Raspberry Pi Forums
October 13, 2021 - tried reinstalling python gpio and gpio wiring libraries. any ideas haven't found anything similar to my issue on the forum. ... also... root@raspberrypi:/home/pi# uname -srv Linux 3.6.11+ #474 PREEMPT Thu Jun 13 17:14:42 BST 2013 ... Perhaps your system has rebooted. You'll need to re-export ...
Discussions

bash: gpio: command not found - Raspberry Pi Forums
root@raspberrypi:/home/pi# echo ... echo “17″ > /sys/class/gpio/unexport bash: echo: write error: Invalid argument root@raspberrypi:/home/pi# gpio bash: gpio: command not found this was working before looks like gpio disappeared of my system ...... More on raspberrypi.org
🌐 raspberrypi.org
September 6, 2017
[SOLVED] RPI.GPIO won't work after fresh install
Hello all, I had to do a fresh install of OSMC because of some SD Card problems, and I can’t get GPIO to work again (hardware=RaspberryPi2). I had an constantly updated OSMC before and my scripts worked just fine setting GPIO up and down. Now, whatever I do there is no change on GPIO pins. More on discourse.osmc.tv
🌐 discourse.osmc.tv
1
0
July 30, 2017
bash - GPIO command for raspberry not working via crontab - Stack Overflow
I've got a Raspberry Pi. I've installed on it WiringPi for pilot GPIO on the board via command line. I've done a script called aggiornaora.sh gpio -g write 18 1 #it set the GPIO port to 1 #log with More on stackoverflow.com
🌐 stackoverflow.com
linux kernel - Not able to access GPIO pins on my Raspberry Pi 5 - Stack Overflow
I recently got started with device drivers programming on my Raspberry Pi. I was writting a program to access GPIO pins. I'm facing an error during gpio_request(). Cant seem to figure out what the More on stackoverflow.com
🌐 stackoverflow.com
🌐
Reddit
reddit.com › r/raspberry_pi › commandline gpio commands not working but python works fine
r/raspberry_pi on Reddit: Commandline GPIO commands not working but python works fine
April 25, 2021 -

I'm going to preface this in that I never use the pi's GPIO except for this one small instance. Pis are overpriced here so I always use an external microcontroller instead which works just fine for 99 percent of things. For some reason in this instance where I thought I would use a pin of the pi it just didn't seem to work. Thinking maybe it was maybe an an issue with the device I was using I swapped it out for a simple LED and resistor and then later tried a python script that worked fine.

Can someone help where i'm being stupid?

So far I can eliminate the following:

- Hardware issues

currently it's just a yellow led and a 100ohm resistor. The polarity is fine

-pin numbering

I am using BCIM pinout for pin 23 or in case i'm wrong about that it's 8 pins from the top left with the hdmi ports facing towards you and then the ground right beside.

so the following bash commands should have worked am i right? I shouldn't even need to be root but that wouldn't hurt I wouldn't think

pi@raspberrypi:~ $ sudo gpio -g mode 23 out

pi@raspberrypi:~ $ sudo gpio -g write 23 1

but no... no life. So I tried every possible combination of bash comand I could think of to get this pin working.

pi@raspberrypi:~ $ sudo gpio -g mode 4 out

pi@raspberrypi:~ $ sudo gpio -g write 4 1

pi@raspberrypi:~ $ sudo gpio mode 4 out

pi@raspberrypi:~ $ sudo gpio write 4 1

pi@raspberrypi:~ $ sudo gpio -g mode 23 out

pi@raspberrypi:~ $ sudo gpio -g write 23 1

pi@raspberrypi:~ $ sudo gpio mode 23 out

pi@raspberrypi:~ $ sudo gpio write 23 1

pi@raspberrypi:~ $ sudo gpio -g mode 16 out

pi@raspberrypi:~ $ sudo gpio -g write 16 1

pi@raspberrypi:~ $ sudo gpio mode 16 out

pi@raspberrypi:~ $ sudo gpio write 16 1

still nothing....

so I did a python script as below and voila... working.

import RPi.GPIO as GPIO

GPIO.setmode(GPIO.BCM)

GPIO.setup(23, GPIO.OUT)

GPIO.output(23, 1)

But why didn't the bash work? What incredibly stupid obvious thing did I miss?

🌐
Raspberry Pi Forums
forums.raspberrypi.com › board index › using the raspberry pi › troubleshooting
[solved] Gpio does not install - Raspberry Pi Forums
-rwxr-xr-x 1 pi pi 1942 Feb 14 10:05 build -rw-r--r-- 1 pi pi 7651 Feb 14 10:05 COPYING.LESSER drwxr-xr-x 2 pi pi 4096 Feb 14 10:05 devLib drwxr-xr-x 6 pi pi 4096 Feb 14 10:05 examples drwxr-xr-x 8 pi pi 4096 Feb 14 10:05 .git drwxr-xr-x 2 pi pi 4096 Feb 14 10:05 gpio -rw-r--r-- 1 pi pi 686 Feb 14 10:05 INSTALL -rw-r--r-- 1 pi pi 865 Feb 14 10:05 People drwxr-xr-x 2 pi pi 4096 Feb 14 10:05 pins -rw-r--r-- 1 pi pi 606 Feb 14 10:05 README.TXT drwxr-xr-x 2 pi pi 4096 Feb 14 10:05 wiringPi pi@raspberrypi ~/wiringPi $ either way, the executable file 'build' is definitely present, so you should be able to invoke it by cd'ing into the installation directory and issuing the command
🌐
Yahboom
category.yahboom.net › home › blog › blog
Solution for "gpio readall" command unable to view Pi 4B pin status
March 31, 2020 - Use the following command to update the version of wiringpi. cd /tmp wget https://project- downloads . drogon . net/wiringpi - latest . deb sudo dpkg -i wiringpi -latest . deb · If you are using the Raspberry Pi official image, this method may solve the problem. But if you use some other images configured, this method may not solve your problem, such Raspberry Pi smart car image. After installing the latest wiringpi, the gpio version is still 2.50 (older version), and the problem with gpio readall is still not resolved.
🌐
Medium
ma2shita.medium.com › how-to-use-raspi-gpio-instead-of-gpio-of-wriring-pi-af2ab00eda57
How to use `raspi-gpio` instead of `gpio` of Wriring Pi | by Kohei "Max" Matsushita | Medium
February 10, 2022 - The gpio command (within Wriring Pi) used to operate GPIOs on the Raspberry Pi is no longer in the Bullseye-based Raspberry Pi OS…
🌐
YouTube
youtube.com › roel van de paar
Raspberry Pi: gpio: command not found (2 Solutions!!) - YouTube
Raspberry Pi: gpio: command not foundHelpful? Please support me on Patreon: https://www.patreon.com/roelvandepaarWith thanks & praise to God, and with thank...
Published   December 30, 2020
Views   1K
🌐
OSMC Forums
discourse.osmc.tv › help and support › raspberry pi
[SOLVED] RPI.GPIO won't work after fresh install - Raspberry Pi - OSMC Forums
July 30, 2017 - Hello all, I had to do a fresh install of OSMC because of some SD Card problems, and I can’t get GPIO to work again (hardware=RaspberryPi2). I had an constantly updated OSMC before and my scripts worked just fine setti…
Find elsewhere
🌐
Raspberry Pi Forums
forums.raspberrypi.com › board index › programming › python
RPi.GPIO Module Not found - Raspberry Pi Forums
Tue Feb 01, 2022 5:21 am all of them say install (sudo apt-get install python3-rpi.gpio) But it doesn't work at all, No matter how many times i try it. Works for me though it doesn't do anything as I already have the latest installed - ... pi@Pi3B:~ $ sudo apt-get install python3-rpi.gpio Reading package lists...
🌐
Raspberry Pi Forums
forums.raspberrypi.com › board index › hardware and peripherals › compute module
command line GPIO tool for CM4 - Raspberry Pi Forums
November 18, 2021 - what package or configuration is need for these utilities? pi@cm4:/tmp $ gpioinfo bash: gpioinfo: command not found pi@cm4:/tmp $ gpioget bash: gpioget: command not found pi@cm4:/tmp $
🌐
Raspberry Pi Forums
forums.raspberrypi.com › board index › using the raspberry pi › beginners
Using GPIO on Pi B+ - Raspberry Pi Forums
The pins and GPIO on the Pis with the 40 pin expansion header are identical. You don't need sudo to run gpio, it is set uid root. If it's not found then it's not installed (perhaps your Pi B+ has an out of date version of Raspbian or you have purged the package - try sudo apt-get install wiringpi).
🌐
Ubuntu
manpages.ubuntu.com › manpages › jammy › man1 › gpio.1.html
Ubuntu Manpage: gpio - Command-line access to Raspberry Pi's GPIO
You can assign any pin numbers you like in your own programs though. read <pin> Read the digital value of the given pin and print 0 or 1 to represent the respective logic levels. write <pin> <value> Write the given value (0 or 1) to the pin. You need to set the pin to output mode first. toggle ...
🌐
GitHub
github.com › RPi-Distro › raspi-gpio
GitHub - RPi-Distro/raspi-gpio: Dump the state of the BCM270x GPIOs · GitHub
This tool is pre-installed in Raspberry Pi OS, but to build from source, you should be able to build and install raspi-gpio with: sudo apt install automake ./configure make sudo make install · Use: raspi-gpio get [GPIO] OR raspi-gpio set <GPIO> [options] OR raspi-gpio funcs [GPIO] OR raspi-gpio raw GPIO is a comma-separated list of pin numbers or ranges (without spaces), e.g. 4 or 18-21 or 7,9-11 Note that omitting [GPIO] from raspi-gpio get prints all GPIOs.
Starred by 127 users
Forked by 29 users
Languages   Shell 48.9% | C 29.2% | Makefile 21.8% | M4 0.1%
🌐
Raspberry Pi Forums
forums.raspberrypi.com › board index › software › other
WiringPi and GPIO not available in ROS 64bit's repos? - Raspberry Pi Forums
August 23, 2022 - There are better alternatives such as pigpio these days. ... WiringPi is no longer maintained by the original developer. Nobody has stepped up to make a new package based on the community fork that is on github. rpi.gpio is in the repo. ... $ apt-cache search rpi.gpio python3-rpi.gpio - Module to control Raspberry Pi GPIO channels (Python 3) rpi.gpio-common - Module to control Raspberry Pi GPIO channels (common files)
🌐
Embedded Computing Design
embeddedcomputing.com › technology › processing › interface-io › quick-start-raspberry-pi-gpio-terminal-interface
Quick Start: Raspberry Pi GPIO Terminal Interface - Embedded Computing Design
February 17, 2022 - Also, when running commands, make ... Ask me how I know this. ... Once logged on, at the pi@raspbeerrypi prompt, enter raspi-gpio help to see what GPIO commands are available....
🌐
Raspberry Pi Forums
forums.raspberrypi.com › board index › projects › automation, sensing and robotics
GPIO command line tool for RPI5 - Raspberry Pi Forums
February 18, 2024 - raspi-gpio help (No, I don't know why there are two different tools for apparently the same purpose, neither indexed in the official Documentation.) Thanks . On RasPiOS Bookworm pinctrl works fine. raspi-gpio is not supported ... Sun Feb 18, 2024 2:34 pm Is there any command line tool (not library) like gpio tool working fine on Raspberry 5?
🌐
GitHub
github.com › zeljkoavramovic › pigpioread
GitHub - zeljkoavramovic/pigpioread: Show Raspberry Pi GPIO pin status, configuration and functions · GitHub
pigpioread -h · Error: raspi-gpio: command not found: Ensure raspi-gpio is installed: sudo apt-get update sudo apt-get install raspi-gpio · Error: gpio number is out of range: The specified GPIO number is invalid for your Raspberry Pi model.
Author   zeljkoavramovic