So what I did was, I installed dnsmasq using the command
apt-get install dnsmasq
Now, what happens is
root@kali:~# dnsmasq
bash: dnsmasq: command not found
root@kali:~# /etc/init.d/dnsmasq start
root@kali:~#
root@kali:~# service dnsmasq start
Job for dnsmasq.service failed because the control process exited with error code.
See "systemctl status dnsmasq.service" and "journalctl -xe" for details.
So, I typed
root@kali:~# systemctl status dnsmasq.service
● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2019-10-30 01:59:14 IST; 52s ago
Process: 6132 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=203/EXEC)
Oct 30 01:59:14 kali systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server...
Oct 30 01:59:14 kali systemd[6132]: dnsmasq.service: Failed to execute command: No such file or directory
Oct 30 01:59:14 kali systemd[6132]: dnsmasq.service: Failed at step EXEC spawning /usr/sbin/dnsmasq: No such file or directory
Oct 30 01:59:14 kali systemd[1]: dnsmasq.service: Control process exited, code=exited, status=203/EXEC
Oct 30 01:59:14 kali systemd[1]: dnsmasq.service: Failed with result 'exit-code'.
Oct 30 01:59:14 kali systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server.
Please help.