If you installed the Windows subsystem for Linux on your Windows 10 PC so you could run Bash and other Linux apps on Windows 10, I am going to show you some basic maintenance tasks to keep everything up to date and your PC secure. Just like other apps and operating systems, the more software you install the more you need to keep up to date, otherwise you risk running an outdated version that could make your PC vulnerable.
The good news is the Windows subsystem for Linux and the Bash universal Windows App makes it easy to keep your Linux apps/packages up to date with the APT package utility. All you need to do is run two commands to make sure everything is current.
First, start up Bash by opening the Start Menu, type in Bash and hit Enter.
Once Bash has started up, you need to update the local package repositories. You can do that by typing in this command:
sudo apt-get update
You may be prompted to enter your root password that was setup when you first installed Bash. Then, you will see the APT package manager reach out to a number of sources to downloaded the latest package meta data.
Once this has completed it is time to install the updated packages. Type in the following and hit Enter:
sudo apt-get upgrade
APT will generate a list of packages that will be updated and ask you for confirmation, hit Y and Enter to begin updating.
Depending on the number of package updates available this can take some time, but once this is completed the Linux side of the house is up-to-date. Make sure to run these two commands monthly to ensure all of your packages, and any associated security vulnerabilities, are fully patched so your PC is protected.