Mods in Minecraft won't install

i dropped my optifine.jar(the mod)in ~/.var/app/com.mojang.Minecraft/.minecraft
and it didn’t show in Minecraft Versions / can’t find them

yeah same at this point i give up im pretty sure there is no other solution then getting a different os