Get nameservers with host command

host -t NS domain.tld
To install this tool on Ubuntu use:
sudo apt install bind9-host