An MX record, or mail exchanger record, is a type of DNS record that specifies the mail server responsible for accepting email messages on behalf of a domain name. MX records are used to route incoming email to the correct mail server, ensuring that emails are delivered to the intended recipient.
To check the MX record for a domain name, you can use the nslookup command. Nslookup is a command-line tool that allows you to query DNS servers for information about domain names.