Saturday, November 26, 2016

Getting all your Drives Linux - Memory games

One of the things that happened to me through using the Raspberry Pi and Linux is that over time I have learnt a few things to type into the shell to get around. 

this is my blog to self of all I can remember in 5 mins

cd  -  change directory

df -h   - list files and sizes

sudo nano /etc/fstab    - describe what drives get mounted at boot

cp +rwx /location directory  /destination directory

chmod - change permissions

chown - change owner


cd ./directory  a directory with in the present directory

ls - list directory

apt-get install package 

crontab -e  -edit the cron tab

ctrl c - escape current process

python /programme path  - run a programme

reboot - reboot the pi

rasp-config


TIMES up 

Note to self must do better

Saturday, November 19, 2016

Solving no network for my pi

On a reboot I was able to ssh into the device but not the internet.

What was effected was both the gateway and DNS server settings

Tested gateway issue through trying to ping google

ping 74.125.29.138 Google

Gateway resolution 

The solution was to add a default gateway which was missing from the routing table

sudo route add default gw 192.168.1.1
With the internet established I was still unable to intstall packages or

apt-get update

This was caused by being unable to resolve the address

mirrordirector.raspbian.org/raspbian

DNS Resolution

Edited the file /etc/resolv.conf

to add the google name servers

done by

sudo nano /etc/resolv.conf

added the following two lines

nameserver 8.8.8.8

nameserver 8.8.4.4


Then we we good to go