Set up Raspberry Pi
Installation
A. Use NOOBS (New Out Of the Box Software)
The step are copied from https://www.raspberrypi.org/learning/software-guide/quickstart/
-
Visit the SD Association’s website and download SD Formatter 4.0 for either Windows or Mac.
Or use terminal,
curl -O https://www.sdcard.org/downloads/formatter_4/eula_mac/SDFormatter_4.00B.pkg
for mac,curl -O https://www.sdcard.org/downloads/formatter_4/eula_windows/SDFormatterv4.zip
for windows. -
Follow the instructions to install the software.
-
Insert your SD card into the computer or laptop’s SD card reader and make a note of the drive letter allocated to it, e.g.
F:/
. -
In SD Formatter, select the drive letter for your SD card and format it.
-
Download NOOBS with raspbian pre-installed or NOOBS only. Or:
curl -O https://downloads.raspberrypi.org/NOOBS_latest -L
, orcurl -O https://downloads.raspberrypi.org/NOOBS_lite_latest -L
- Extract the files from the zip.
- Once your SD card has been formatted, drag all the files in the extracted NOOBS folder and drop them onto the SD card drive. The necessary files will then be transferred to your SD card.
- When this process has finished, safely remove the SD card and insert it into your Raspberry Pi.
B. Use An Image
You can choose the image on the Download Page, Here we choose Raspbian.
Raspbian comes pre-installed with plenty of software for education, programming and general use. It has Python, Scratch, Sonic Pi, Java, Mathematica and more.
- Download RASPBIAN JESSIE WITH PIXEL, Or RASPBIAN JESSIE LITE
- Extract the files from the zip.
-
Visit etcher.io and download and install the Etcher SD card image utility.
- Run Etcher and select the Raspbian image you unzipped on your computer or laptop.
- Select the SD card drive. Note that the software may have already selected the right drive.
- Finally, click Burn to transfer Raspbian to the SD card. You’ll see a progress bar that tells you how much is left to do. Once complete, the utility will automatically eject/unmount the SD card so it’s safe to remove it from the computer.
SSH
ENABLE SSH
The Raspberry Pi has an SSH server enabled by default. The SSH server on your Raspberry Pi may be disabled, in which case you will have to enable it manually. This is done using raspi-config
:
Enter sudo raspi-config
in the terminal, first select advanced options
, then navigate to ssh
, press Enter
and select Enable
or disable ssh server`.
CONNECT
The default user name and password:
Username: pi
Password: raspberry
Use arp -a
to find out the ip of Pi, then ssh pi@PI_IP_ADDRESS
to connet to pi.
Login without Password
The Link for the solution: http://www.linuxproblem.org/art_9.html
- Run
ssh-keygen -t rsa
(Skip this step if you already generated the rsa keys) - Run
ssh pi@PI_IP_ADDRESS mkdir -p .ssh
to create.ssh
folder on pi - Run
cat .ssh/id_rsa.pub | ssh pi@PI_IP_ADDRESS 'cat >> .ssh/authorized_keys'
to append your public key to pi’s authorized_keys file. - Then you can login pi without password,
ssh pi@PI_IP_ADDRESS
Create Alias for SSH
- Create
config
file in the~/.ssh
folder of your laptop if not existed - Add the following into the
config
file
Host pi
Hostname PI_IP_ADDRESS
User pi
- Then you can use
ssh pi
to login to your pi.
VNC
A. ENABLING VNC SERVER GRAPHICALLY
On your Raspberry Pi, boot into the desktop.
Select Menu > Preferences > Raspberry Pi Configuration > Interfaces.
Ensure VNC is Enabled.
B. ENABLING VNC SERVER AT THE COMMAND LINE
You can enable VNC Server at the command line using raspi-config
:
sudo raspi-config
Now, enable VNC Server by doing the following:
Navigate to Advanced Options.
Scroll down and select VNC > Yes
.
C. RUN VNCSERVER AT STARTUP
See this link: https://learn.adafruit.com/adafruit-raspberry-pi-lesson-7-remote-control-with-vnc/running-vncserver-at-startup, it’s using tightvncserver, install it first.
blog comments powered by Disqus