Score:1

I possibly installed a malware by a misspelled java installation command in the terminal

US flag

I was trying to download java, more specifically, JDK version 16. The right command was sudo apt install openjdk-16-jdk, but I end up typing sudo apt install open-jdk-11 instead, the funny thing is that the command ran sweet and asked me to give a confirmation if I really wanted to download the package and it gave to me a complete list of what was going to be installed, so I just typed Y, because who reads this sort of thing anyway?

In the middle of the installation, I noticed the command was misspelled, so I turned down the energy of my computer, so it did not finish the installation.

I tried to search on the internet if anyone already had used this command or advised someone to use it, but the only thing I found was a strange Chinese website with this command in it, which wasn't very comforting to me.

After this frustrating attempt to look for something on the web, I tried to run the same command again. Still, this time don't allow it to be installed by typing N when apt asked me if I really wanted it to be installed, just to see if the package was installed or not, but nothing happened. It just said to me that the package could not be found.

My question is: Could I just have installed malware, although the installation wasn't completed? Any help will be much appreciated.

Pilot6 avatar
cn flag
You couldn't install malware from Ubuntu repositories. You can run `history` and see what was the exact command.
Pilot6 avatar
cn flag
Please add output of `apt policy open-jdk-11`. There is no such package in official repos.
Artur Meinild avatar
vn flag
*"because who reads this sort of thing anyway?"* Maybe you will from now on?
Rishon JR avatar
pl flag
JDK cannot contain malware anyway(Even if they managed to bypass ubuntu's virus scanners)
Score:4
sa flag

The sudo apt install openjdk-11-jdk command installs OpenJDK Development Kit 11 in all currently supported versions of Ubuntu, however the sudo apt install open-jdk-11 command installs nothing and returns an Unable to locate package open-jdk-11 error message in all currently supported versions of Ubuntu. It is likely that you installed openjdk-11-jdk and running the following command would confirm this.

apt policy openjdk-11-jdk

Another way to confirm that you unintentionally installed openjdk-11-jdk is to search through your recent bash history going back a large number of lines, let's say the last 100 lines in your bash history, for lines containing openjdk-11-jdk.

history 100 | grep openjdk-11-jdk

If the preceding command doesn't return any useful results, try running history 100 without the pipe to grep openjdk-11-jdk in order to print all of the 100 most recent lines in your bash history.

Run the following command to uninstall openjdk-11-jdk:

sudo apt remove openjdk-11-jdk
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.