i wanted to enable SPI on my raspberry pi 3 but in ubuntu mate it says the command "raspi-config" is not found, what is the alternative to this?
You have to manually edit
config.txt to enable the Device Tree overlay.
raspi-config is just a front end to the various configuration files.
AFAIK the SPI entry is there, but commented out (mine have been modified so many times I don't know the default).
overlays for more detail.