How to Easily Install the LAMP Stack on Ubuntu

I have seen tutorials instructing beginners on the installation of the LAMP stack on Ubuntu. Most of these tutorials are too complicated for a beginner. The easiest way to install the LAMP stack on a non-production system is:

sudo apt-get update
sudo apt-get install lamp-server^

Now navigate to "localhost" in your preferred web browser. This location corresponds to "/var/www/html" on your file-system. Utilizing the "chmod" command, the file and directory permissions can be set depending on use cases. You can learn more about chmod here.

Try putting a PHP file in "/var/www/html" with the name "test.php":

echo "I installed the LAMP stack on Ubuntu!";

Now navigate to localhost/test.php and "I installed the LAMP stack on Ubuntu!" will be displayed on the screen.

You are now set to develop PHP applications!

Linux Commands: Extracting Pages From a PDF File

Sometimes you just want a simple way to extract pages from a PDF. Opening up a GUI is overkill for this task. The Linux command line is here to help with a utility called ‘pdftk’. On Debian or Ubuntu based distributions, one can usually install this opening up a new terminal window and typing:

sudo apt-get install pdftk -y

Now to extract pages from the PDF:

pdftk {myPdfFile} cat {startPageNumber}-{endPageNumber} output {outputPdfFileName}

That’s it!