Figuring out what devices are hanging around on your network can be a real hassle, especially if you suspect unauthorized access or just want to tidy things up. This guide is about using Ubuntu’s terminal commands to get a clear picture of all active IPs, so you can see what’s connected without breaking a sweat. It’s especially useful if your network feels sluggish or you keep getting strange devices popping up.

By the time you’re done, you’ll have a pretty good idea of what’s on your LAN — who should be there, who shouldn’t, and maybe even identify some unknown gadgets lurking around. A good skill for network security amateur hour, or just plain troubleshooting when stuff isn’t working right. So, let’s jump into it and see what’s live on the subnet.

How to Find Used IPs in Ubuntu

Getting started with your terminal and your network info

First, you need access to your terminal. If you’re on Ubuntu, just press Ctrl + Alt + T. That opens a new window where all the magic happens. Now, you need to figure out what your own IP is and what range your network uses. Without this info, the scans could go haywire, or you might miss a bunch of devices.

Type this to see your current IP address and subnet:

ip addr show

Look for the line starting with inet. It usually looks like 192.168.1.4/24. The /24 means your network covers from 192.168.1.1 to 192.168.1.254. If you see something different — maybe 192.168.0.1/24 or 10.0.0.1/24 — just note that. Basically, it’s the chunk of IPs your router assigns to devices.

Install Nmap — your network spy tool

Next, you’ll need Nmap. It’s a pretty popular, powerful network scanner, and on Ubuntu, it’s as simple as typing:

sudo apt install nmap

Hit Y when prompted, then Enter. Basically, this installs the tool that’s going to ping everything on your subnet to see what answers back. On some setups, the install might fail the first time, or require a quick reboot, but usually it’s straightforward. Once installed, Nmap is your best friend for these jobs.

Scan your network for all active devices

Now, you want to scan the subnet. You’ll run a command similar to:

sudo nmap -sn 192.168.1.0/24

Replace 192.168.1.0/24 with whatever network range you found earlier. The -sn flag makes Nmap do a ping scan — it just checks which addresses are live, without trying to probe ports or services. Expect a few seconds (or longer if your network’s big), and then Nmap will spit out a list with IP addresses, MAC addresses, and device names if it can detect them.

On some machines this seems a little flaky, or it takes a while, so don’t be surprised if the first run isn’t super smooth. Sometimes it helps to run the scan again, or tweak your command (e.g., add -v for verbose output).

What the results tell you and what to do next

The output lists all responding IPs, plus some device info. Especially useful if you’re trying to weed out unknown gadgets that shouldn’t be there. On one network, everything might look familiar, on another, you’ll see ‘stragglers’ that seem suspicious. Keep an eye out for strange MAC addresses or IP addresses you don’t recognize. That might be your signal to change Wi-Fi passwords or tighten security.

And yes, it’s kind of weird, but sometimes your phone or smart devices won’t respond to the ping, so don’t consider them gone — just because they’re silent doesn’t mean they aren’t there. Still, it’s a solid start for tracking active devices.

Extra tips & common hiccups

If things aren’t matching expectations, double-check your subnet, or try running the scan from a different terminal or network interface. Sometimes, you need to run the scan with root privileges (via sudo) or disable firewalls that block ping responses. Also, if it feels like the scan isn’t finding everything, remember that network complexity (like multiple subnets or VLANs) could hide some devices. In those cases, you’ll need to scan specific ranges or check the router’s admin interface for a full device list.

Finally, if your network’s super locked down or uses advanced security, Nmap might not get full info. In those cases, log into your router, go to Settings > Attached Devices or whatever menu your device uses. Sometimes, the info there is more reliable, especially for seeing all connected gear.

Summary

  • Check your IP and subnet with ip addr show
  • Install Nmap with sudo apt install nmap
  • Scan your network with sudo nmap -sn your-subnet
  • Review the list and look for devices you don’t recognize

Wrap-up

This method isn’t foolproof, but it gives a pretty decent rundown of what’s live on your local network. It’s helpful if you want quick visibility without jumping into router settings all the time. Just be aware that some devices might hide or ignore pings, so don’t panic if not everything shows up at first. Possibly, on one setup it worked perfectly, and on another, not so much. That’s just how network stuff goes.

Hopefully, this shaves a few hours off the troubleshooting for someone. Now, go check your devices and stay secure!