Important! This is an automatic machine translated page. If you can read english, you should Click Here to read the original English version of the article.

Change your Network Card MAC Address on Ubuntu Thay đổi Network Card Địa chỉ MAC của bạn trên Ubuntu

There are a lot of reasons you might want to manually set your MAC address for your network card. Có rất nhiều lý do bạn có thể muốn tự thiết lập địa chỉ MAC cho card mạng của bạn. I won't ask you what your reason is. Tôi sẽ không yêu cầu bạn những gì là lý do của bạn.

To change this setting, we'll need to edit the /etc/network/interfaces file. Để thay đổi cài đặt này, chúng tôi sẽ cần phải chỉnh sửa / etc / network / interfaces file. You can choose to use a different editor if you'd like. Bạn có thể chọn sử dụng một trình soạn thảo khác nếu bạn muốn.

sudo gedit /etc/network/interfaces sudo gedit / etc / network / interfaces

You should see the line for your network interface, which is usually eth0. Bạn sẽ nhìn thấy dòng cho giao diện mạng của bạn, mà thường eth0. If you have dhcp enabled, it will look like this: Nếu bạn có dhcp kích hoạt, nó sẽ như thế này:

auto eth0 auto eth0
iface eth0 inet dhcp iface eth0 inet dhcp

Just add another line below it to make it look something like this: Chỉ cần thêm một dòng dưới nó để làm cho nó giống như thế này:

auto eth0 auto eth0
iface eth0 inet dhcp iface eth0 inet dhcp
hwaddress ether 01:02:03:04:05:06 hwaddress ether 01:02:03:04:05:06

Obviously you would want to choose something else for the MAC address, but it needs to be in the same format. Rõ ràng là bạn sẽ muốn chọn cái gì khác với địa chỉ MAC, nhưng nó cần phải được định dạng giống nhau.

sudo /etc/init.d/networking restart sudo / etc / init.d / networking restart

You will need to restart networking or reboot to take effect. Bạn sẽ cần phải khởi động lại mạng hoặc khởi động lại để có hiệu lực.

This article was originally written on 12/31/06 Tagged with: Bài viết này ban đầu được viết ngày 12/31/06 Tagged với: Ubuntu Ubuntu

Daily Email Updates Email cập nhật hàng ngày

You can get our how-to articles in your inbox each day for free. Bạn có thể làm thế nào chúng tôi vào các bài viết trong hộp thư của bạn mỗi ngày miễn phí. Just enter your name and email below: Chỉ cần nhập tên và email của bạn dưới đây:


Name: Tên:
Email: Email:

Comments (17) Comment (17)

  1. PhinnFort PhinnFort

    Try to apt-get macchanger. Hãy thử apt-get macchanger. Much easier to use. Dễ dàng hơn để sử dụng.

  2. maddin maddin

    via bash: qua bash:

    1) sudo ifconfig down 1) sudo ifconfig xuống
    2) sudo ifconfig hw ether 11:22:33:44:55:66 2) sudo hw ether 11:22:33:44:55:66 ifconfig
    3) sudo ifconfig up 3) sudo ifconfig lên

    thats it thats it

  3. Jacob Rhoden Jacob Rhoden

    The ifconfig method will only temporarily change your mac address. Phương pháp ifconfig sẽ chỉ tạm thời thay đổi địa chỉ mac của bạn.

  4. procuro procuro

    try this: thử này:

    sudo gedit /etc/init.d/bootmisc.sh sudo gedit / etc / init.d / bootmisc.sh

    on the bottom of the page, insert: trên dưới cùng của trang, chèn:

    killall dhclient killall dhclient
    killall dhclient3 killall dhclient3
    ifconfig eth0 down ifconfig eth0 down
    ifconfig eth0 hw ether 112233445566 ifconfig eth0 hw ether 112.233.445.566
    ifconfig eth0 up ifconfig eth0 up
    /sbin/dhclient / sbin / dhclient
    /sbin/dhclient3 / sbin/dhclient3

    anything in this file will load after the regular boot process is started up. bất cứ điều gì trong tập tin này sẽ được tải sau khi quá trình khởi động thường xuyên được khởi động. So putting this in the file will change the mac address everytime the machine starts. Vì vậy, đặt trong tập tin này sẽ thay đổi mọi địa chỉ mac máy bắt đầu.

  5. Doni Doni

    This script is good. Đây là kịch bản tốt. But not working localhost & azureus etc. Nhưng không phải làm việc localhost & azureus vv
    You must apply: Bạn phải áp dụng:

    sudo gedit /etc/network/interfaces sudo gedit / etc / network / interfaces

    And paste in this file: Và dán trong tập tin này:

    auto lo tự lo
    iface lo inet loopback iface lo inet loopback
    auto eth0 auto eth0
    iface eth0 inet dhcp iface eth0 inet dhcp
    hwaddress ether XX:XX:XX:XX:XX:XX hwaddress ête XX: XX: XX: XX: XX: XX

  6. DX DX

    The tutorial dosn't work for me. Công tác dosn't hướng dẫn cho tôi. Don't know why. Không biết tại sao.
    Then I tryed procuro's method and it works but just for a minute. Sau đó, tôi tryed procuro phương pháp và nó hoạt động nhưng chỉ cho một phút. Then my laptop dies, gets blocked and I can't do nothing. Sau đó, máy tính xách tay của tôi chết, bị chặn và tôi không thể làm gì.
    I have a wired connection and generated ip. Tôi có một kết nối có dây và ip tạo ra.

  7. DX DX

    I found this: Tôi thấy các mặt hàng này:
    **************************************************************** ************************************************** **************
    Open terminal and type as follow: Mở terminal và gõ như sau:

    $ ifconfig $ Ifconfig

    $ cd /etc/init.d $ Cd / etc / init.d

    $ sudo nano ChangeMAC $ Sudo nano ChangeMAC

    Then, fill configuration file with new MAC Address. Sau đó, điền vào file cấu hình với địa chỉ MAC mới.
    sudo ifconfig eth1 down sudo ifconfig eth1 xuống
    sudo ifconfig eth1 hw ether xx:xx:xx:xx:xx:xx sudo ifconfig eth1 xx ête hw: xx: xx: xx: xx: xx
    sudo ifconfig eth1 up sudo ifconfig eth1 up
    sudo /etc/init.d/networking stop sudo / etc / init.d / networking stop
    sudo /etc/ini.d/networking restart sudo / etc / ini.d / mạng khởi động lại

    Save and close the file Lưu và đóng tập tin

    Apply configuration file. Áp dụng tập tin cấu hình.
    $ sudo chmod +x ChangeMAC $ Sudo chmod + x ChangeMAC

    $ sudo update-rc.d ChangeMAC defaults $ Sudo update-rc.d ChangeMAC mặc định

    Restart machine, and check new MAC Address with ifconfig command. Khởi động lại máy, và kiểm tra địa chỉ MAC mới với ifconfig lệnh.
    **************************************************************** ************************************************** **************

    WORKS JUST FINE! WORKS JUST FINE!

  8. The Geek The Geek

    @DX @ DX

    Thanks for the update, I'll test and change the article. Cảm ơn bạn đã cập nhật, tôi sẽ kiểm tra và thay đổi bài viết. I'm guessing when I wrote this it worked for an older version of Ubuntu, but not anymore. Tôi đoán khi tôi đã viết này nó đã làm việc cho một phiên bản cũ của Ubuntu, nhưng không được nữa.

  9. typo typo

    small typo in last line of DX's script, should be /etc/iniT.d/networking restart typo nhỏ ở dòng cuối cùng của kịch bản DX's, nên được / etc / init.d / networking restart

    thanks, btw! thanks, btw!

  10. Jhom Jhom

    Hi, Chào,
    Tried all the options (not together Đã thử tất cả các tùy chọn (không phải cùng nhau : D ), but no one didn't fix the problem for me. ), Nhưng không ai đã không giải quyết được vấn đề đối với tôi.
    with ipconfig I still have my eth0 with my old mac adress. với ipconfig tôi vẫn còn có eth0 của tôi với địa chỉ mac của tôi cũ.
    Anyone new ideas? Bất cứ ý tưởng mới?
    Thanks, Cảm ơn,

    Jhom Jhom

  11. HIBRA HIBRA

    hi chào
    I did what in the DX's script exactly,and when I restart the machine a white screen appeared Tôi đã làm những gì trong kịch bản của DX chính xác, và khi tôi khởi động lại máy một màn hình trắng xuất hiện
    after I logged in and I couldn't get my desktop again sau khi tôi đăng nhập vào và tôi không thể có được máy tính để bàn của tôi nữa
    the computer is now waiting……. máy tính bây giờ là chờ đợi ... ....
    for your solutions cho các giải pháp của bạn

    thanks cảm ơn

  12. vas vas

    Open terminal and type as follow: Mở terminal và gõ như sau:

    $ ifconfig $ Ifconfig

    $ cd /etc/init.d $ Cd / etc / init.d

    $ sudo nano ChangeMAC $ Sudo nano ChangeMAC

    Then, fill configuration file with new MAC Address. Sau đó, điền vào file cấu hình với địa chỉ MAC mới.
    sudo ifconfig eth1 down sudo ifconfig eth1 xuống
    sudo ifconfig eth1 hw ether xx:xx:xx:xx:xx:xx sudo ifconfig eth1 xx ête hw: xx: xx: xx: xx: xx
    sudo ifconfig eth1 up sudo ifconfig eth1 up
    sudo /etc/init.d/networking stop sudo / etc / init.d / networking stop
    sudo /etc/init.d/networking restart sudo / etc / init.d / networking restart

    Save and close the file Lưu và đóng tập tin

    Apply configuration file. Áp dụng tập tin cấu hình.
    $ sudo chmod +x ChangeMAC $ Sudo chmod + x ChangeMAC

    $ sudo update-rc.d ChangeMAC defaults $ Sudo update-rc.d ChangeMAC mặc định

    Restart machine, and check new MAC Address with ifconfig command. Khởi động lại máy, và kiểm tra địa chỉ MAC mới với ifconfig lệnh.
    **************************************************************** ************************************************** **************

    WORKS JUST FINE!am trying this now, i will let u know if it worked! WORKS JUST FINE! Sáng cố này ngay bây giờ, tôi sẽ cho u biết nếu nó làm việc!

  13. vas vas

    try this: thử này:

    sudo gedit /etc/init.d/bootmisc.sh sudo gedit / etc / init.d / bootmisc.sh

    on the bottom of the page, insert: trên dưới cùng của trang, chèn:

    killall dhclient killall dhclient
    killall dhclient3 killall dhclient3
    ifconfig eth0 down ifconfig eth0 down
    ifconfig eth0 hw ether 112233445566 ifconfig eth0 hw ether 112.233.445.566
    ifconfig eth0 up ifconfig eth0 up
    /sbin/dhclient / sbin / dhclient
    /sbin/dhclient3 / sbin/dhclient3

    anything in this file will load after the regular boot process is started up. bất cứ điều gì trong tập tin này sẽ được tải sau khi quá trình khởi động thường xuyên được khởi động. So putting this in the file will change the mac address everytime the machine starts. Vì vậy, đặt trong tập tin này sẽ thay đổi mọi địa chỉ mac máy bắt đầu.

    this one worked in the newest Ubuntu distro year 2009 jan/feb. này làm việc trong năm mới nhất của distro Ubuntu 2009 Tháng Một / Tháng Hai

  14. vas vas

    ill test the other once to, if their are people who know more script or command ideas of changing mac address than post here, ill test those to! ill thử nghiệm khác để một lần, nếu họ là những người biết chữ nhiều hơn hoặc lệnh ý tưởng thay đổi địa chỉ mac hơn đăng ở đây, những người bị bệnh để thử nghiệm!

  15. miRo Miro

    All the time I was using the ifconfig method in some /etc/init.d startup scripts (without changemac program), but now i tried the solution from original post and i find it the best. Tất cả thời gian của tôi đã được sử dụng trong một số phương pháp ifconfig / etc / init.d script khởi động (không có chương trình changemac), nhưng bây giờ tôi đã cố gắng giải pháp từ bài gốc và tôi thấy là tốt nhất. It's very clean, i just added the line “hwaddress ether 01:02:03:04:05:06″ to /etc/network/interfaces and after restart everything works like a charm… Nó rất sạch sẽ, tôi chỉ cần thêm vào dòng "hwaddress ether 01:02:03:04:05:06" để / network / etc / giao diện và sau khi công trình khởi động lại tất cả mọi thứ như một nét duyên dáng ...

  16. miRo Miro

    oh, i almost forgot… works under Debian 5.0 Lenny {stable} oh, tôi gần như quên ... các công trình dưới 5,0 Debian Lenny (ổn định)

  17. unknown chưa biết

    [b]for mac osx users:[/b] [b] cho người dùng OSX mac: [/ b]

    sudo ifconfig en1 ether (mac-address) sudo ifconfig en1 ête (mac-địa chỉ)
    *this will spoof your mac-address* * này sẽ spoof mac của bạn Địa chỉ *
    ifconfig en1 |grep ether ifconfig en1 | ête grep
    *this will show you your current mac-address* * này sẽ cho bạn thấy mac hiện tại của bạn Địa chỉ *


Leave a Comment Để lại một Thảo luận




Leave your Để lại của bạn friendly thân thiện comment here. bình luận ở đây.

If you have a computer help question, Nếu bạn có một câu hỏi giúp máy tính, click here to leave it on the forums bấm vào đây để lại nó trên các diễn đàn instead. thay vì.

Note: Your comment may not show up immediately on the site. Lưu ý: Ý kiến của bạn có thể không hiển thị ngay lập tức trên trang web.

Our Friends Bạn bè của chúng tôi
Getting Started Bắt đầu


About How-To Geek Giới How-To Geek
What Is That Process? Quá trình đó là gì?
svchost.exe svchost.exe
jusched.exe jusched.exe
dwm.exe dwm.exe
ctfmon.exe ctfmon.exe
wmpnetwk.exe wmpnetwk.exe
wmpnscfg.exe wmpnscfg.exe
rundll32.exe rundll32.exe
wfcrun32.exe wfcrun32.exe
Ipoint.exe Ipoint.exe
Itype.exe Itype.exe
Wfica32.exe Wfica32.exe
Mobsync.exe Mobsync.exe
conhost.exe conhost.exe
Dpupdchk.exe Dpupdchk.exe Adobe_Updater.exe Adobe_Updater.exe

Copyright © 2006-2009 HowToGeek.com. Bản quyền © 2006-2009 HowToGeek.com. All Rights Reserved. Tất cả các quyền.