Editing
Ip link set / `ifconfig
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Using ifconfig === You can change the MAC address manually using `ifconfig`. * `eth0` = '''Wired Ethernet interface''' (commonly used on Linux) * `wlan0` = '''Wireless interface (Wi-Fi)''' (used on Linux) * `en0` = '''Wi-Fi interface on macOS''' (typically the active wireless adapter) <syntaxhighlight lang="bash"> # Change MAC for wired connection (Linux - eth0) ifconfig eth0 down ifconfig eth0 hw ether 00:11:22:33:44:55 ifconfig eth0 up # Change MAC for wireless connection (Linux - wlan0) ifconfig wlan0 down ifconfig wlan0 hw ether 66:77:88:99:AA:BB ifconfig wlan0 up # Change MAC for wireless connection on macOS (en0) sudo ifconfig en0 ether 66:77:88:99:AA:BB </syntaxhighlight> On macOS, it is usually not necessary to bring the interface down and up when changing the MAC address using `ifconfig`. The new address takes effect immediately. If connectivity issues occur, the following alternative method can be used: <syntaxhighlight lang="bash"> sudo ifconfig en0 down sudo ifconfig en0 ether 66:77:88:99:AA:BB sudo ifconfig en0 up </syntaxhighlight> These commands assign a temporary MAC address. The original MAC will return after reboot unless persistence is configured via network settings or launch scripts.
Summary:
Please note that all contributions to HackOps may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
HackOps:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Tools
What links here
Related changes
Special pages
Page information