Command:
login as root: su - root
connect gpio 17 pin and GND pin
echo 17 > /sys/class/gpio/export
echo out > /sys/class/gpio/direction
echo 1 > /sys/class/gpio/value # LED bright
echo 0 > /sys/class/gpio/value # LED dim
echo 17 > /sys/class/gpio/unexport
WiringPi
gpio mode 0 out
gpio write 0 1
gpio write 0 0
WiringPi-python
sudo get-apt install python-dev python-pip
sudo pip install wiringpi
or
sudo esay_install-2.7 wiringpi
blink.py
import wiringpi
io = wiringpi.GPIO(wiringpi.WPI_MODE_SYS)
io.pinMode(17,io.OUTPUT)
io.digitalWrite(18,io.HIGH) # Turn on light
io.digitalWrite(18,io.LOW) # Turn off
Reference
https://github.com/Gadgetoid/WiringPi2-Python
http://wiringpi.com/