I didn't realize firefox could be downloaded inside of OS so I went online and found this code to type in the terminal.
sudo apt-get update && sudo apt-get install firefox
Is there any chance I got a malware version?
elementary OS Stack Exchange is a question and answer site for developers and users of elementary OS and applications. It only takes a minute to sign up.Sign up to join this community
You actually did install Firefox the safe way inside the OS. However, you used the command line instead of a graphical frontend. So no worries, there is nothing wrong with your Firefox installation, both alternatives have the same result.
Under elementary OS / Linux often "there is more than one way to do it…"