How To PI


Here you can learn the basics of coding, and the Raspberry Pi.



1. Getting a Raspberry Pi
2. Getting an OS on Your System
3. Basic Raspbian Terminal
4. Basic SSH
5. Advanced Raspbain Terminal

Getting a Raspberry Pi

The computer I have running this server is a Raspberry Pi.
The Pi runs on a USB, so power usage is minimal.
Another important factor is cooling.
The Raspberry Pi will run at room temperature without needed cooling.
Such as fans, heat sinks, or freeon systems.
Some Raspberry Pi kits will come with heatsinks though.
You can get the raspberry pi here.


Getting an OS on Your System

The next step in getting a working raspberry pi is choosing an OS for your Pi.
The easiest OS to get is NOOBS you can download it here.
Next you must sacrifice an SD card and extract the files from Noobs into it.
After that, insert the SD card into the SD card slot.
Plug the micro USB into a power source, plug the htmi in to screen and wach you pi boot!
The Pi will come to a screen and ask wich os you would like to install.
Choose Raspbain then click install.(You will need a mouse and keyboard.)
When it has compleated it will take you to a blue screen with different options.
You may set all of them to what you want, but make sure to turn on SSH.
The pi should now display a desktop similar to a computer.
If not type startx, then press enter.
Now you have a working Raspbain on your pi.


Basic Raspbain Terminal

The Raspbain terminal can be confusing at first, but with a little help it will make sence.

The fist command you should learn is: ls.
Ls simpily lists what is in the current directory. You can put -a after it to view all files.

The next command is: cd.
Cd takes you to the next diectory. Ex: cd somedirectory/somedirectory. This helps when looking though files. Ex: ls /some file/youtfile.txt or cd /some file ls yourfile.txt

Third is cat.
Cat displays the file you input. Ex: cat Somefile.txt

Fourth is nano.
Nano is a text editor for terminal. Ex: nano SomeFile.txt. It will be used much more when you get to ssh.

Fifth is yes.
While being pretty useless, yes just reapeats what you put after it. Use Ctrl+C to stop it. Ex: yes reapeat this!

You should now know the basic terminal codes.


Basic SSH

SSH is used to connect remotely to your pi.
First you must enable SSH.(If you followed the instructions above you allready did this.)
Second find you ip by hovering over the wifi, or eathernet symbol in the top right.(You need internet connection for this.)
A grey box will popup saying connected to yournetwork at 192.168.1.2(example). You may want to check often as it may change.
Third you need an SSH client, go here to get one. If you computer is a chromebook go to the chrome extentions and find
an app called Secure Shell.
Open your client and type your ip adress. If your using Secure Shell type pi@*your ip*
If it asks unknown connection continue? Click yes.
Your connection should open to a login. The default username is pi, and the default password is raspberry.
it will open with copyright information and the Raspbain terminal.
Now is a good time to get aquainted with the terminal codes above.


Advanced Raspbain Terminal

These codes will be muliple words and will be more complicated.
First is sudo apt-get install.
This command will install the program you choose. Ex: sudo apt-get install *your program*.

Second is sudo apt-get dist-upgrade.
This command will upgrade any programs on your pi that can be upgraded.

Third is sudo apt-get update.
This command will find and download and upgrades, but will not upgrade them.

Fourth is sudo apt-get update && sudo apt-get dist-upgrade.
This command will do the last 2 commands at once.

Fifth is sudo find / -name.
This command will run a full system search for your file or folder. Ex: sudo find / -name *your file or folder*.