Detect RPi Hardware Version

Get Human Readable Hardware Details cat /proc/cpuinfo Get RPi Version Code Use the command: cat /proc/cpuinfo | grep 'Revision' | awk '{print $3}' The returned code can be looked up on the table at http://www.raspberrypi-spy.co.uk/2012/09/checking-your-raspberry-pi-board-version/ , copied below:  

Read More

Text Files – Viewing

Viewing Text Files head – View the start of a text file Show the first 20 lines: head -20 /home/pi/mytextfile.txt tail – View the end of a text tile Show the last 20 lines tail -20 /home/pi/mytextfile.txt  

Read More

sudo

Becoming the root user sudo su Which users are allowed to use sudo You can use this command to open the sudoers file: sudo nano /etc/sudoers BE VERY CAREFUL TO COPY THIS FILE BEFORE YOU CHANGE IT – IF YOU MAKE AN ERROR YOU CAN STOP YOURSELF BEING ABLE TO OPEN THE FILE USING SUDO (changes […]

Read More

Installing

Fixing broken installs You can use the "–fix-missing" option to retry an install and look for items that we're previously missed due to errors sudo apt-get install somename –fix-missing  

Read More

Update Packages

As well as wanting to regularly check for updates so any security vulnerabilities are patched, you should also check for updates before installing anything new as often applications rely on the system being up to date to be able to install correctly. Updating all installed packages or Update Operating System Distribution apt-get update will not […]

Read More

Networking

More Networking Things Our Raspbian specific networking stuff is here: https://raspberry-projects.com/pi/category/pi-operating-systems/raspbian/network-settings IP Address ip addr Is A Specific Interface Connected ip link show wlan0 WiFi List discovered networks sudo iwlist wlan0 scan Is network connected ifconfig wlan0 If the inet addr field has an address beside it, the RPi has connected to the network.  Get connected […]

Read More

Break

On the Raspberry Pi Command Line Break CTRL + Break Via SSH Terminal Programs CTRL + C

Read More

tar, for zipping files, directories, etc

Show all options tar –help Create Archive Of Specific Files tar -vfcz outputfilename.gz inputfile1 inputfile2 Zipping Files And Directories Use this to move to the directory containing the files and / or directories you want to zip cd projects/myfolder Zip 1 File tar -vczf zip_output_filename.gz file_to_zip.a Zip 2 Files tar -vczf zip_output_filename.gz file_to_zip1.a file_to_zip2.a Zip A […]

Read More

Help

Displaying a programs options Type this on the command line: program_name –help        

Read More

Sleep

Can be useful when chainging commands together in scripts etc: sleep 5 Will ause a pause of 5 second    

Read More