As Ubuntu users, we may want to know if we are the only ones using our network, especially the WLAN, or if there are other unwanted users exploiting our network bandwidth. This capability and knowledge are also helpful when we want to be sure that no hacker is accessing our system by connecting to our network.
This article describes step by step how to use the Nmap tool, which provides you with a list of all devices connected to your network. We have run the commands and procedures described in this article on Ubuntu 22.04 LTS.
We will be using the Ubuntu command line, the Terminal, in order to view the devices connected to our network. Open the Terminal either through the system Dash or the Ctrl+Alt+T shortcut.
When it comes to reliable network scanning, Nmap is a tool that you can totally depend on.
Enter the following command as sudo in the Terminal application in order to install the tool.
The system will ask you for the password for sudo since only an authorized user can install/uninstall and configure software on Ubuntu.
The system will also ask you to confirm the installation with y/n. Please type y and press enter to start the installation process.
To know which devices are connected to your network, you first need to determine the IP range or subnet mask of your network. We will use the ifconfig command to determine this IP. To run the ifconfig command, we need to install the net-tools package on our Ubuntu server or desktop. Use the following command to install net-tools if you do not already have it installed on your system:
$ sudo apt install net-tools
The system will prompt you with a y/n option to confirm the installation. Please enter Y and hit enter to begin the installation process.
Once you have the net-tools utility available, run the following command to get information about the network(s) your system is connected to:
$ ifconfig
The highlighted IP in the output shows that our system uses the subnet mask 192.168.100.0, and the range is 255. So our network IP range is from 192.168.100.0 to 192.168.100.255.
Instead of using the ifconfig tool, you can also get the subnet mask from the Ubuntu user interface.
Access the settings utility in System Dash and check the details of your network by clicking on the settings icon next to the WLAN or Ethernet network you are connected to.
In this example, we have checked the settings of a wi-fi network we are currently connected to.
The highlighted ipv4 address or the Default Route address indicates that we are connected to a subnet IP 192.168.100.0
Through the Nmap tool, you can scan the report of all devices connected to a network by providing the subnet mask IP as follows:
$ nmap -sP 192.168.100.0/24
The output shows that three devices are connected to the network: the router itself, the Linux system I use on my laptop, and my phone.
Use the following command to exit the terminal application after extracting the information you need:
$ exit
In this article, you learned how an Ubuntu user could install and use the Nmap command. We showed you how to see which devices are connected to your network. This way, you can verify that no unauthorized device is connected to your network.
Magento is a free and open-source e-commerce platform written in PHP. It is simple, easy…
ISPConfig is an open-source control panel that allows users to manage multiple servers from a…
As a Linux administrator, you may find it necessary to troubleshoot or test your Simple…
Ubuntu 24.04, like many modern Linux distributions, relies on the NetworkManager for managing network connections.…
Restic is a modern, open-source backup program designed for efficiency, security, and simplicity. It enables…
phpMyAdmin is a popular free tool written in PHP intended to administer MySQL and MariaDB…