Install the package genisoimage:
sudo apt install genisoimage
Run the command mkisofs:
mkisofs -o destination-filename.iso /home/username/folder-name
Or, using dd, run the following command:
dd if=/dev/cdrom of=/home/username/iso-name.iso