Not QUITE so simple, but almost so.
You will need to make sure that your hosting plan allows for multiple domains and virtual hosts. Most do, nowadays, at least for 2-3 domains.
With a VPS or dedicated server, of course, generally no problem. You may have to pay for extra IP addresses if you prefer that the sites have seperate IPs, but that wouldn't normally be the case if you are just redirecting and not hosting separate content.
If your host doesn't support this, you have other options. Registrars and third-party DNS providers often offer "forwarding" service, which is often mislabeled as a "DNS" feature. It isn't. They run a web server that does a 301 redirect to your main site. You point the secondary site to their server, and it does the redirects.
Finally, how do you want the URL bar in the browser to read after the user has navigated to the site?
That is, you have:
example2.com -> example.com
If somebody types in [example2.com,...] when they arrive on your site, do you want the URL to read example2 or example?
If you want it to read example2, then you need to set up a virtual host, and just point it to the same content directory on the server. You will also have to make sure all your links in your pages are relative, not absolute.