A simple Ghostscript command to merge two PDFs in a single file is shown below:
gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=combine.pdf -dBATCH 1.pdf 2.pdf
Install Ghostscript:
Type the command sudo apt-get install ghostscript
to download and install the ghostscript package and all of the packages it depends on.
I slightly modified @oliverlambson 's function to accept n arguments, where the first argument is the name of the resulting pdf.
pdfcombine () { gs -q -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=${1%.*}.pdf -dBATCH ${@:2} }