First you need to install it as:
sudo apt-get install imagemagick
and then convert simply as:
convert foo.jpg foo.pdf
Here's script i wrote to convert all the .jpg files in the current directory to .pdf:
for file in *.JPG;
echo "$file coverted to $count.pdf"
convert $file $count.pdf
Now to combine multiple pdfs to one , one needs to install two small packages:
gs and pdftk
next to combine use the following command:
pdftk *.pdf output combined.pdf
where combined.pdf is the new combined pdf formed.
Hope it was useful.
Proud to use open source :)