Below are some built-in commands that you can make use of on the Mac Terminal to monitor the network traffic.
netstat Command
Make use of the netstat command to display network statistics and all the active network connections.
% netstat -i
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
lo0 16384 <Link#1> 3994 0 3994 0 0
lo0 16384 127 localhost 3994 - 3994 - -
lo0 16384 localhost ::1 3994 - 3994 - -
lo0 16384 c2cs-macboo fe80:1::1 3994 - 3994 - -
gif0* 1280 <Link#2> 0 0 0 0 0
stf0* 1280 <Link#3> 0 0 0 0 0
anpi1 1500 <Link#4> 9e:00:90:d3:c2:cc 0 0 0 0 0
anpi0 1500 <Link#5> 9e:00:90:d3:c2:cb 0 0 0 0 0
en3 1500 <Link#6> 9e:00:90:d3:c2:ab 0 0 0 0 0
en4 1500 <Link#7> 9e:00:90:d3:c2:ac 0 0 0 0 0
en1 1500 <Link#8> 36:5f:76:30:f6:80 0 0 0 0 0
en2 1500 <Link#9> 36:5f:76:30:f6:84 0 0 0 0 0
ap1* 1500 <Link#10> 3a:3e:ef:d8:68:7c 0 0 0 0 0
en0 1500 <Link#11> 18:3e:ef:d8:68:7c 675074 0 338171 0 0
en0 1500 c2cs-macboo fe80:b::d1:abdc:8 675074 - 338171 - -
en0 1500 192.168.0 192.168.0.105 675074 - 338171 - -
awdl0 1500 <Link#12> a6:fa:d5:9d:42:03 0 0 10 0 0
awdl0 1500 fe80::a4fa: fe80:c::a4fa:d5ff 0 - 10 - -
llw0 1500 <Link#13> a6:fa:d5:9d:42:03 0 0 0 0 0
llw0 1500 fe80::a4fa: fe80:d::a4fa:d5ff 0 - 0 - -
bridge0 1500 <Link#14> 36:5f:76:30:f6:80 0 0 0 0 0
utun0 1500 <Link#15> 0 0 1 0 0
utun0 1500 c2cs-macboo fe80:f::a941:6a66 0 - 1 - -
utun1 1380 <Link#16> 0 0 3 0 0
utun1 1380 c2cs-macboo fe80:10::e415:752 0 - 3 - -
utun2 2000 <Link#17> 0 0 4 0 0
utun2 2000 c2cs-macboo fe80:11::f908:bf5 0 - 4 - -
utun3 1000 <Link#18> 0 0 3 0 0
utun3 1000 c2cs-macboo fe80:12::ce81:b1c 0 - 3 - -
utun4 1350 <Link#19> 0 0 4 0 0
utun4 1350 c2cs-macboo fe80:13::b194:e5e 0 - 4 - -
utun5 1380 <Link#20> 0 0 4 0 0
utun5 1380 c2cs-macboo fe80:14::5e27:fa3 0 - 4 - -
tcpdump Command
Get the dump of your network using the tcpdump packet analyzer command. Note, that you will need administrative privileges to run this command.
sudo tcpdump -i en0
If you want to monitor network traffic in real-time on the Terminal you can make use of the console-based network bandwidth monitoring tool called iftop. You will need to get it installed using Homebrew.
brew install iftop
You will need administrative privileges to run this command.
sudo iftop
Facing issues? Have Questions? Post them here! I am happy to answer!
Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.
Follow him on: X
You can also reach out to him via e-mail: rakesh@code2care.org
- How to show line numbers in Nano on Mac
- How to install Jupyter Notebook on macOS Sonoma
- How to Disable Remote Management using Mac Terminal
- Test internet speed using macOS Terminal command
- Docker Desktop needs privileged access macOS
- Google Search Hot Trends Screensaver for Mac OS X
- How to do calculations in Mac Terminal
- How to make TextEdit the default text Editor on Mac
- How to Show Full Website Address on Safari for Mac (Ventura/Sonoma)
- The Zsh Shell - Mac Tutorial
- Opening mac Terminal
- How to change the name of your Mac running on macOS Ventura 13
- How to find the Battery Cycle Count on macOS Ventura
- How to set an emoji as Zsh terminal prompt in macOS
- How to access Trash Folder using Mac Terminal Command
- macOS Ventura XCode Command Line Tools Installation
- Hide Bluetooth icon on Mac Menu Bar macOS Ventura 13
- How to run .sh file in Mac Terminal
- Terminal Command to get the list of available shells in macOS
- How to see Storage Information on macOS Ventura
- How to Go To /usr/local/bin on Mac Terminal?
- How to do screen recording on Mac
- How to Find File and Directory Size in Mac Terminal
- Open .bash_profile File in TextEdit using Terminal
- Remove Now Playing icon from macOS Big Sur Menu Bar
- How to add Date and Time to Windows Notepad File - NotepadPlusPlus
- How to install maven in macOS using Terminal Command - MacOS
- osascript wants to make changes while Android Studio Installation on Mac OS X - Mac-OS-X
- Java Thread.sleep() Method Deep Dive with Examples - Java
- 17: Find Factorial of a Number - 1000+ Python Programs - Python-Programs
- How to Convert String to DateTime in Python - Python
- Docker Desktop needs privileged access macOS - MacOS
- -bash: startup.sh: command not found - Apache Tomcat 8 - Tomcat