The NetUtil TUI application now includes an integrated terminal that allows you to execute network commands without leaving the application. This feature is designed to streamline network diagnostics and troubleshooting workflows.
Keyboard Shortcut: Press x from the main view
- Execute any system command
- View output in real-time
- Scroll through command history
- Clear terminal output
The terminal can run any command available on your system, including:
- Network diagnostics (ping, traceroute, nslookup)
- Interface information (ifconfig, ip)
- Routing table (netstat, route)
- DNS queries (dig, host)
- Port scanning (netcat, telnet)
- Any other system command
-
Open Terminal
- Press
xfrom the main interface view
- Press
-
Enter Command
- Type your command at the
>prompt - Example:
ping -c 4 8.8.8.8
- Type your command at the
-
Execute
- Press
Enterto run the command - Output appears in the terminal window
- Press
-
View Output
- Output is displayed line by line
- Long output is automatically scrollable
-
Scroll Through Output
- Use
↑arrow to scroll up - Use
↓arrow to scroll down
- Use
-
Run Another Command
- Simply type a new command and press
Enter - Previous output remains visible above
- Simply type a new command and press
-
Clear Terminal
- Press
Ctrl+lto clear all output
- Press
-
Exit Terminal
- Press
Escto return to main view
- Press
# Ping a host
ping -c 4 google.com
# Ping with count (Linux/macOS)
ping -c 10 192.168.1.1
# Continuous ping (Ctrl+C to stop - not recommended in terminal)
ping 8.8.8.8# Basic DNS lookup
nslookup google.com
# Reverse DNS lookup
nslookup 8.8.8.8
# Query specific DNS server
nslookup google.com 1.1.1.1
# Dig command (more detailed)
dig google.com
# Short dig output
dig +short google.com# Trace route to host
traceroute google.com
# Trace route with max hops
traceroute -m 15 8.8.8.8
# Fast traceroute (Linux)
traceroute -I google.com# Show specific interface (macOS)
ifconfig en0
# Show all interfaces (macOS)
ifconfig -a
# Show specific interface (Linux)
ip addr show eth0
# Show all interfaces (Linux)
ip addr
# Show interface statistics
netstat -i# Show routing table (macOS/BSD)
netstat -rn
# Show routing table (Linux)
ip route
# Show routing table (alternative)
route -n# Test if port is open
nc -zv google.com 80
# Test HTTPS port
nc -zv google.com 443
# Telnet to port
telnet google.com 80# Show network connections
netstat -an
# Show listening ports
netstat -an | grep LISTEN
# Show established connections
netstat -an | grep ESTABLISHED# Show ARP cache
arp -a
# Show ARP for specific interface
arp -a -i en0- Long-running commands (like
pingwithout count) will continue until stopped - Use commands with limited output when possible
- Examples:
- ✅
ping -c 4 google.com(4 packets) - ❌
ping google.com(infinite)
- ✅
- Terminal shows ~20 lines at a time
- Use
↑/↓to navigate through longer output - Scroll position indicator shows current position
- All commands and their output remain in the terminal
- Scroll up to see previous commands
- Use
Ctrl+lto clear when terminal gets cluttered
- Commands run with the same privileges as the app
- Most diagnostic commands don't require sudo
- If you need elevated privileges, run the app with sudo:
sudo ./target/release/netutil-tui
- Failed commands show error output
- Exit codes are displayed for failed commands
- Example:
Command exited with status: 1
Workflow example:
- Select an interface in the main view
- Press
ito see details and note the interface name - Press
xto open terminal - Run commands specific to that interface:
ping -I en0 8.8.8.8 ifconfig en0
# Step 1: Test basic connectivity
ping -c 4 8.8.8.8
# Step 2: Test DNS resolution
nslookup google.com
# Step 3: Trace route to see where packets go
traceroute 8.8.8.8
# Step 4: Check if specific port is accessible
nc -zv google.com 443# Query current DNS servers
nslookup google.com
# Test different DNS servers
nslookup google.com 8.8.8.8
nslookup google.com 1.1.1.1
# Detailed DNS query
dig google.com +trace# Show active connections
netstat -an | grep ESTABLISHED
# Show listening services
netstat -an | grep LISTEN
# Show network interface statistics
netstat -i# Check interface details
ifconfig en0
# Check IP configuration (Linux)
ip addr show eth0
# Verify routing
netstat -rn
# Check ARP table
arp -a- Interactive Commands: Commands requiring interactive input (like passwords) won't work properly
- Long Output: Very long output may cause the terminal to use more memory
- Signal Handling: Can't send signals (Ctrl+C) to running commands
- Command Completion: No tab completion or command history navigation
- Editing: No command line editing features (use backspace to delete)
You can use shell operators:
# Run multiple commands
ping -c 2 8.8.8.8 && echo "Success"
# Pipe output
ifconfig en0 | grep inet
# Output redirection (creates files in current directory)
netstat -rn > routes.txt# Test internet connectivity
ping -c 1 8.8.8.8 && echo "Internet OK"
# Test DNS
nslookup google.com > /dev/null && echo "DNS OK"
# Test specific host
ping -c 1 192.168.1.1 && echo "Gateway reachable"If you get "command not found" errors:
- The command may not be installed on your system
- Check if the command exists:
which ping - Install missing tools (e.g.,
brew install inetutilson macOS)
If you get permission errors:
- Some commands require sudo privileges
- Run the entire app with sudo if needed
- Example:
sudo ./target/release/netutil-tui
If command runs but no output appears:
- Some commands output to stderr instead of stdout
- The terminal captures both stdout and stderr
- Error lines are prefixed with "ERROR:"
If the terminal becomes hard to read:
- Press
Ctrl+lto clear all output - Start fresh with your next command
The terminal works seamlessly with other NetUtil features:
-
After Viewing Interface Details (
i)- Open terminal (
x) - Run diagnostics on that specific interface
- Open terminal (
-
After Configuration Changes
- Make a network change (IP, DNS, etc.)
- Open terminal to verify:
ifconfig en0 nslookup google.com
-
Before Making Changes
- Test current configuration in terminal
- Make informed decisions about changes needed
| Key | Action |
|---|---|
x |
Open terminal (from main view) |
Enter |
Execute command |
↑ |
Scroll output up |
↓ |
Scroll output down |
Ctrl+l |
Clear terminal |
Backspace |
Delete character from command |
Esc |
Exit terminal and return to main view |
| Any character | Add to command |
- Terminal commands execute with the privileges of the app
- Commands are not sanitized or restricted
- Use caution when running commands, especially with sudo
- Avoid commands that modify system files unless intentional
- The terminal doesn't store command history between sessions
Potential improvements for future versions:
- Command history with ↑/↓ navigation
- Tab completion
- Command aliases
- Saved command snippets
- Background command execution
- Multiple terminal tabs
- Command output export
- Syntax highlighting