the following is my opinion as it is the way I learned programming. I've been programming for around 4-5 months, 4 with a university class and 1 with a Coursera class.
____
For Mac all you need is the Terminal app (which comes prepackaged) as your command line. Start off with a language like Python - Python is packaged with Mac so you don't need to download anything. Terminal is also a Python interpreter and use nano to make scripts.
Learn with Python just enough so you can get a strong understanding of what booleans, conditionals, recursion, iteration, arrays, and objects are. The syntax is really simple (if I may, "dumbed down") so anybody can understand it. Then do some C or C++ do get an idea of what using a low-level language is like. My experience with compiling C++ with my class is by using Putty (which comes with G++ which is a C++ compiler).
Udacity has a free course on Python and I recommend you get a book on C/C++.
Then decide on what you want to do. If you want to web development, first learn how to use a command line interface, git, emacs, and GitHub. In order to get an Ubuntu dev environment (which you do), you have to either use a Virtual Machine (locally) or a t1.micro EC2 Instance on Amazon Web Services (remote machine). Pick the 12.04.2 LTS server when signing up so you can get 1 year of free AWS service. Also learn how to use Heroku.
Then choose between Ruby, Python, and JavaScript as the web dev language you want to learn. You can also choose PHP but there's really no reason to. For Ruby, you want to first learn the Ruby language and then learn how to use the Ruby on Rails web framework. Python's web framework is Django, and JavaScript uses Node.Js to do its server side stuff. The class I'm taking right now is using Node.js/JavaScript and I recommend that if you want to focus on front-end web development since there is little effort on the server-side. But learn all three and the pro's and con's of each before you choose.
For actual web design you want to learn HTML (information), CSS (styles), Javascript (activity), and jQuery(Javascript library that makes Javascript simpler). Codecademy has courses on all four that should make you a competent web designer. Then download Twitter Bootstrap - it is a HTML/CSS/jQuery web framework that is very popular with internet startups. They just released Bootstrap 3 which focuses more on flat design. Also learn about responsive design which changes how a website appears based on accessing it on phone vs. tablet vs. laptop/PC.
-----------------------
In terms of ACTUAL LEARNING, it's going to be a long journey for you. You're going have to learn to be resourceful and search the internet for questions you have. For initial learning you will need to read online info, books, and docs, but for the real learning it's going to take hours of trial-by-error to make you a good programmer. Spend hours and hours on StackOverflow reading answered questions to learn through other people's mistakes. The users on SO will not hold your hand when it comes to so learning to be resourceful is very important. I was extremely frustrated with something two days ago and I was ready to publish a question until realized an obvious error in the code I posted. Google will be your new best friend here.
It's going to take a while but whatever you choose to do you will get good at if you put time and practice into it. I only went over front-side web dev since it is something I am comfortable generalizing about so hopefully someone else can answer what you can do for app development - but for starters Objective-C is the language for iOS development and Java is the language for Android development. Please take some time to learn the constraints of each language as you are all over the place in the OP