If you’re using Windows, type cmd into the Windows Search bar, right-click Command prompt, and then select Run as administrator. On macOS, type Terminal into Spotlight search, and then double-click Terminal. On Linux, press Ctrl + Alt + T or open a terminal window from your window manager.

If you have the computer’s hostname but not its IP address, just ping the hostname—this will give you the IP address, which you’ll need for the next step.

Replace ipaddress with the IP address or hostname of the remote computer. Replace username and password with an actual username and password that has administrator rights on the remote computer.

If you’re using Windows, type cmd into the Windows Search bar, right-click Command prompt, and then select Run as administrator. On macOS, type Terminal into Spotlight search, and then double-click Terminal. On Linux, press Ctrl + Alt + T or open a terminal window from your window manager.

Windows: Run the ipconfig command. macOS: Open System Preferences and go to Network > Advanced > TCP/IP. Linux: Run ifconfig or ip a.

For example, if your IP address is 10. 0. 0. 3 and you want to scan all hosts on your subnet, you would use nmap -sn 10. 0. 0. *.