The method you'll need to scan a document on a Mac depends on what kind of scanner you have. Here's how to set up nearly any scanner on a Mac.
Install nmap if you don't already have it on your Linux computer. Run "sudo apt-get install nmap" on Ubuntu, or "sudo dnf ...