Getting ready
You will need to be connected to the internet to update your system. It is always advisable to make a backup of your image first (and at a minimum, make a copy of your important files).
You can check your current version of firmware with the uname -a command, as follows:
Linux raspberrypi 4.4.9-v7+ #884 SMP Fri May 6 17:28:59 BST 2016 armv7l GNU/Linux
The GPU firmware can be checked using the /opt/vc/bin/vcgencmd version command, as follows:
May 6 2016 13:53:23 Copyright (c) 2012 Broadcom version 0cc642d53eab041e67c8c373d989fef5847448f8 (clean) (release)
This is important if you are using an older version of firmware (pre-November 2012) on a newer board, since the original Model B board was only 254 MB RAM. Upgrading allows the firmware to make use of the extra memory if available.
The free -h command will detail the RAM available to the main processor (the total RAM is split between the GPU and ARM cores) and will give the following output:
total used free shared buffers cached Mem: 925M 224M 701M 7.1M 14M 123M -/+ buffers/cache: 86M 839M Swap: 99M 0B 99M
You can then recheck the preceding output following a reboot to confirm that they have been updated (although they may have already been the latest).