-
Notifications
You must be signed in to change notification settings - Fork 7
Part 1. Upgrade to Raspbian Jessie
If you need to check whether or not you're already running Jessie, run the following command:
$ hostnamectl
You should see:
Operating System: Raspbian GNU/Linux 8 (jessie)
If it says something different, you need to upgrade!
Note: Another way to get Debian Jessie onto your Pi is to reformat your SD card (or format a new one) with the Jessie image. Upgrading is really for anyone who already has packages/scripts on their Pi that they don't want to overwrite with a new image.
To update the Pi's current OS, run the commands:
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get dist-upgrade
These are general commands to update your Pi's software. It's always good practice to run them before installing anything. If you've run them recently, it'll take less than a minute for the Pi to update. If you haven't run them in a while/ever, they could take a couple minutes.
Edit the sources.list file:
$ sudo nano /etc/apt/sources.list
Change the first line to look like this:
deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
Save with ctrl-x,y, then enter.
We just changed the file that tells the Pi what Raspbian image files to fetch and use for the upgrade, so now we just update/upgrade again to install Jessie.
This is the part that could take an hour. Make sure that your Pi is somewhere safe while it updates!
Run the commands:
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get dist-upgrade
Once the update gets close to finishing, you may be prompted for a couple responses. Most are trivial and depend on your preference (you should probably say yes to restarting services while upgrading, and yes to replacing all config files - these should be the default options), but there is a very important one you need to watch for! If you see:
Disable SSH password authentication for root?
Type NO. Otherwise you won't be able to SSH in!
When text has finished scrolling and you can type into the command line again, enter:
$ sudo reboot
When your Pi boots, you'll be running Jessie!