$ sudo apt install firefox
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package firefox
  • Please edit your question and give us some more details, starting with what operating system you are using. Why is putty relevant? The error is quite clear: there is no package named firefox available, but we can't help more unless you tell us what system you are using. If, as seems to be the case, this is some sort of Debian derivative, please also show us the output of cat /etc/apt/sources.list.
    – terdon
    Mar 9 at 18:36
  • I'm using the windows machine Mar 9 at 18:39
  • cat /etc/apt/sources.list # deb us.archive.ubuntu.com/ubuntu bionic main restricted # deb us.archive.ubuntu.com/ubuntu bionic-updates main restricted # deb security.ubuntu.com/ubuntu bionic-security main restricted # See help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of the distribution. deb us.archive.ubuntu.com/ubuntu bionic main restricted # deb-src us.archive.ubuntu.com/ubuntu bionic main restricted Mar 9 at 18:39
  • 3
    Please Edit your question to add the information. You can use the formatting tools to format it as code. Make sure to explain exactly what you are doing. I think you mean you are using Windows Subsystem for Linux but, if so, why is putty relevant?
    – terdon
    Mar 9 at 18:40
  • 3
    We're making some assumptions here based on your lack of detail. @terdon has tagged this as windows-subsystem-for-linux based on the output you provided, and I agree that's likely the case even though you don't mention WSL in the question. Based on that, I've also edited the title and provided the most likely answer for your problem. But please do read our How do I ask a good question? page. Hopefully I've answered your question, but you'll have much better chances of getting an answer if you provide more info. Thanks! Mar 10 at 0:44

2 Answers 2


It's likely, if you just installed WSL and (assuming, but you don't mention the exact distribution) Ubuntu (but could be any Debian-based distribution) that you haven't performed a critical first-step:

sudo apt update && sudo apt upgrade

It's really the first step in using any Debian-based distribution from the command-line, even when not using WSL.

Really only the first update part is required to install Firefox, but the second upgrade is highly recommended to bring your system up-to-date.

For the first part, most WSL distributions don't ship with the package cache populated, to save on download bandwidth. So you need to do this regardless on WSL.

The second part, upgrading, is recommended for the same reason you do a Windows Update after first installing -- The installed packages are almost always somewhat out-of-date, and updated packages have been released since the time the distribution was distributed.

That said, note that you will need to be running Windows 11 in order to use the Linux version of Firefox in WSL, at least without additional configuration. See my Super User answer here for more information.


You have disabled the security repository:


sudo sed -i '/security/s/^# //' /etc/apt/sources.list

Update the repositories:

sudo apt update

Then you should be able to install firefox:

sudo apt install firefox

Not the answer you're looking for? Browse other questions tagged or ask your own question.