Useful Linux Commands
Useful Linux commands   pwd                 (present working directory)  tells you which directory you are in ls       (list sorted)  list of files in the current directory   ls -a   (list sorted all)  this includes  all system files as well  cd     (change directory) use it together with the directory you want  (e.g.  cd stewart  to go the stewart’s folder) clear   clears screen Ctrl Z   suspends currently running program - but remains in memory startx  Starts the graphical interface (GI)  The Linux version of Windows Ctrl + D Log out of present work Ctrl + C  stops and interrupts program  including video recording  ls -1  list programs in a single line echo  writes text on next line  eg echo  hallo  ping  can communicate with website or network  eg  ping stewart-pi  or  ping 129.168.1.68 cat   will display catalogue of file (the contents) mk dir   makes  a directory grep-  used to search for a particular letter  eg  grep  e  (or grep e sd | grep b)   sudo  sudo python name.py  (used when super user is required) nano  is a basic text editor on Pi  example  nano blinky.py sudo shutdown -h now   ( or or sudo shutdown -h now -r) sudo halt      stop program and leaves it in low power mode ready to remove power GPIO.cleanup()                 To clean up on exit    sudo reboot     shutdown and reboot
sudo - apt-get install            e.g sudo apt-get install alsa-utils  (to get a beep sound) sudo python blinky.py       (sudo python is added to run blinky.py) sudo rpi-update            Updates Raspberry Pi  firmware clear                           clears screen ~                                 short for home/pi   (called tilda) sudo shutdown - h now   to stop sudo shutdown -r now    to recall sudo ifconfig              displays your internet address such as 192.168.1.83 startx                                    Loads desktop on raspberry pi  at start up   sudo apt-get update            sudo apt-get upgrade           updates your Debian ‘Wheezy’ software History                               Lists the history in the LXTerminal                           To run one of the numbers listed again type !number                            e.g  !20  to reuse the information at line 20 in history  sudo raspi-config    to  config raspberry pi
Example  IP  Addresses for a RaspPi      192.168.1.73   or  192.168.1.69    
Copyright © Stewart Dunn 2013 onwards
Pi-School