# ifconfig Command Reference
## What it does
Displays and configures network interfaces - shows IP addresses, MAC addresses, network status, and statistics.
## Basic Usage
```bash
ifconfig # Show all active interfaces
ifconfig -a # Show all interfaces (including inactive)
ifconfig en0 # Show specific interface
```
## Display Arguments
| Argument | Description |
|----------|-------------|
| `-a` | Show all interfaces (active and inactive) |
| `-u` | Show only active (up) interfaces |
| `-d` | Show only inactive (down) interfaces |
| `-l` | List interface names only |
| `-s` | Show network statistics |
## Configuration (requires sudo)
```bash
ifconfig en0 up # Enable interface
ifconfig en0 down # Disable interface
ifconfig en0 192.168.1.100 # Set IP address
ifconfig en0 netmask 255.255.255.0 # Set subnet mask
```
## Common macOS Interfaces
- `en0` → Primary Ethernet/Wi-Fi
- `en1` → Secondary network interface
- `lo0` → Loopback (127.0.0.1)
- `utun0/1` → VPN tunnels
## Quick Commands
```bash
# Get your main network info
ifconfig en0
# Find all IP addresses
ifconfig -a | grep "inet "
# List all interface names
ifconfig -l
```