Two raspberry command line every newbie has to know

1) pinout

This tool is provided by the GPIO Zero Python library, 

It allows you to know better the GPIO map of your raspberry. So GPIO number, which are for 5v/3.3v and which are for negatives

Installation

Before we can use the pinout tool, we need to first update the package list by running the following command.

sudo apt update

Then, we can install the package that will provide us with the pinout tool by using the command below.

sudo apt install python3-gpiozero

and finally

pinout

2) gpio readall

Basically the library name is WiringPi, and you can use it to manage many of the functionalities provided by the GPIO header: digital pins, SPI, I2C, UART, etc.

to installi it:

sudo apt-get install wiringpi

to check if the installation went ok:

gpio -v

Ok, now it’s the moment to show it in action:

gpio readall

you should get something like this:

it shows every pin of your raspberry boards and

  1. the numbering of the pin
  2. the voltage (in case of voltage pin)
  3. if it’s in use (1) or not (0)
  4. set High or Low voltage for each pin through command line (for example gpio -g write 33 1 give voltage to pin number 33 gpio -g write 33 0, remove voltage to that pin number 33)