rfs and img are both system dumps so they make no difference
you cant edit rfs ordinarily .
You can mount as rfs as Fat in ubuntu and read/copy the files
editing them wont work at all .
you will need to compile rfs module in to the ubuntu kernel and then insmod and mount the rfs to edit it properly
in windows ,use Magic ISO to extract data from rfs fi;les (same reason ,rfs files can be mounted as fat )
However,You can edit rfs file in your phone by mounting the files in sd card using busybox( Samsung kernels have rfs module ....)
But instead of doing such a pointless ringamarole just use a CWM Rom and edit it
,much simpler ,more effective .
if the .img file has ext4 file system then you can edit them in ubuntu by loop mounting .
But I dont think samsung use anything but that laggy rfs ...