> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bytejmp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# macchanger

> MAC address spoofing tool: change, randomize, or restore the hardware address of a network interface.

## Overview

macchanger modifies the MAC address of a network interface. Used in wireless attacks to impersonate connected clients, bypass captive portals, avoid detection, or set a specific BSSID for a rogue AP.

***

## Install

```bash theme={"dark"}
sudo apt install macchanger
```

***

## Usage

```
macchanger [options] <interface>
```

The interface must be down before changing the MAC.

***

## Common Flags

| Flag       | Description                       |
| ---------- | --------------------------------- |
| `-m <MAC>` | Set a specific MAC address        |
| `-r`       | Set a random MAC address          |
| `-p`       | Reset to original permanent MAC   |
| `-s`       | Show current and permanent MAC    |
| `-l`       | List known vendors                |
| `-a`       | Set random vendor MAC (same kind) |
| `-A`       | Set random MAC (any vendor)       |

***

## Set Specific MAC

```bash theme={"dark"}
systemctl stop network-manager
ip link set wlan1 down
macchanger -m <TARGET-MAC> wlan1
ip link set wlan1 up
```

***

## Set Random MAC

```bash theme={"dark"}
ip link set wlan1 down
macchanger -r wlan1
ip link set wlan1 up
```

***

## Restore Original MAC

```bash theme={"dark"}
ip link set wlan1 down
macchanger -p wlan1
ip link set wlan1 up
```

***

## Show Current MAC

```bash theme={"dark"}
macchanger -s wlan1
```
