To resize and shrink a PDF in Ubuntu using the command line, you can use the following command: pdfjam --scale '0.5' input.pdf -o output.pdf. This command scales the PDF by 50% and saves the resulting file as output.pdf.