I was exposed to Java and C# in my computer science engineering course, but I never actually learned much apart from the basics which I needed for the course itself. Ironically, I didn't pick up on the very things which I was thought formally.
I learned basic javascript and more PHP stuff (MVC, OOP, templates et all) when I got a chance to intern in a small start up. I did a few small freelance jobs after that.
I learned some basic Python and Ruby by myself, and learned advanced Javascript when I got exposed to Node.js. I learned more Ruby when I got a small Ruby/Sinatra gig. More Node.js when I got employed as a Node.js developer. MongoDB/Redis/everything else was mostly on the job.
Linux/Bash was a lot of experimentation, and a lot of practice.
As you can see, the pattern is that I learned mostly by myself: By trying to do things, and by using online resources. I never read a full book (apart from the Javascript the Good Parts), and never finished a full online course. I learned as I worked.
I am not condoning this method, and I don't know if its the best, but it's what worked for me.