Updating Raspbian Jessie
This will update the operating system with the latest security updates and software patches. Raspbian Jessie is a Debian operating system so the apt package manager is used.
Connect via SSH to the Pi.
Update the repository archives by entering
sudo apt-get -y update
apt-get: is the name of the Debian package manager executable.
-y: with this option, apt-get automatically assumes the default answer to any apt-get prompts.
update: tells the package manager to download the list of available packages from the repositories. It does not update any software or packages.
Once complete, update the installed packages by entering
sudo apt-get -y upgrade
apt-get: is the name of the Debian package manager executable.
-y: with this option, apt-get automatically assumes the default answer to any apt-get prompts.
upgrade: downloads and installs any updates to packages the manger knows about by way of the repository lists downloaded earlier.
This may take some time depending on the updates that need to be applied.
I’m installing my favorite editor vim (Vi IMproved).
sudo apt-get -y install vim
apt-get: is the name of the Debian package manager executable.
-y: with this option, apt-get automatically assumes the default answer to any apt-get prompts.
install: downloads and installs the package if it is not already.
vim: the name of the package(s) to be installed.
I turn on colors in VIM known as syntax highlighting by entering
sudo vim /etc/vim/vimrc
Arrow down to the 19th line that begins “syntax on.
Place the cursor over the ““” (comment indicator) and press the “x” key to remove it.
Then have VIM save (write) and quit by typing
:wq
Press Enter.
It’s a good idea to reboot after upgrading.
sudo reboot
Other bits
If the downloading of the packages goes incredibly SLLLOOW, consider adding a Raspbian Mirror to the /etc/apt/sources.list file.