The GPIOs are typically accessible in /sys/class/gpio folder.

Each GPIO has its own folder. For instance GPIO 44 will use folder named /sys/class/gpio/gpio44.

If the folder is not present, the GPIO needs to be exported first. This can be done by:

# echo 44 > /sys/class/gpio/export
Shell
and similarily unexported by

# echo 44 > /sys/class/gpio/unexport
Shell
Inside the gpio folder are the two important 'files': value and direction.

To read the value of a gpio, first set the gpio as an input by:

# echo in > /sys/class/gpio/gpio44/direction
Shell
and then read the value by

# cat /sys/class/gpio/gpio44/value
Shell
Similarily, set the value of output GPIOs by first setting the direction

# echo out > /sys/class/gpio/gpio44/direction
Shell
and then set the value low by

# echo 0 > /sys/class/gpio/gpio44/value
Shell
or to high

# echo 1 > /sys/class/gpio/gpio44/value