Getting the basic LAMP stack is actually easy with Ubuntu, you can install with just one command...
This will install Apache along with MySQL and PHP and give you a basic configuration that will serve web pages from your /var/www directory.
sudo apt-get install lamp-server^
Just google for 'ubuntu 12.04 lamp' and you will find plenty of more detailed guides out there.
For commands in general, I suggest you start with the CLI resources page on the Ubuntu wiki...