Installing and updating modules
So far, we have learnt how to access the board remotely via SSH, from any machine on your local network. Now, we are going to see what we can actually do with that. As we are still in an introductory chapter, we will see how to perform a simple operation—update the Linux modules that are already installed on the board, and install new ones.
Getting ready
To follow this recipe, you need to have a Galileo board with a fully operational Linux image, on which you can access via SSH just as we did in the previous recipe. The Linux image you are using doesn't actually matter that much.
How to do it...
Once you are logged in to your Galileo board via SSH, you are able to type commands directly into the terminal. Every time you see a line starting with root@galileo
, this means we will be using the terminal.
If you are using the IoT image, the first thing you can do is type the command:
opkg update
This will update the list of available packages and updates for your Galileo board. This is the result inside the console:
Note that this also requires the Galileo board to be connected to the Internet, for example, by plugging it into your Internet router.
Now, you can actually update the packages themselves by typing:
opkg upgrade
This will automatically update all packages that need to be updated. Make sure you run it regularly, as Intel comes up with new versions of these packages all the time.
You can also use the package manager to install new modules. To see which packages are available, type:
opkg list
This will list all the available packages, as shown in this screenshot:
To install a given package, just type the following command, replacing package_name
with the name of the package you want to install:
opkg install package_name
How it works...
The opkg
command installs the package manager (opkg
) for the Intel Galileo Linux machine. It allows you to update your existing packages automatically and also install new packages on your Galileo board. In this way, you can always stay up-to-date and extend the functionalities of your board with new modules.
There's more...
We only covered the basics of what the opkg
tool can do. To see all the possibilities offered by the tool, type this into the terminal:
opkg –h
This will list all the commands and options offered by this tool.
See also
Installing new packages and updating existing packages requires you to access your board remotely. So far we have done this via Ethernet, but you can check the next recipe to learn how to do it via Wi-Fi.