LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-16-2010, 03:13 AM   #1
bentheman
LQ Newbie
 
Registered: Dec 2010
Location: Israel
Posts: 17

Rep: Reputation: 0
Smile How to change eth1 to wlan0 in fedora


Hello everyone!
I'm pretty new in Linux so I have to ask for your generous help
I recently installed Linux "Fedora" and when I click "ifconfig" I see can see the network card "eth1"
I want to change it to "wlan0", I realized that this is a common enough problem at Fedora, and I read about it a bit on Google but unfortunately I did not understand how to change it correctly.
i'll Say thank's if you will give me the order strictly Consul that allows Linux to change the name of my network card

Thank you all in advance for your help,

Ben
 
Old 12-16-2010, 03:37 AM   #2
fatra2
Member
 
Registered: Feb 2004
Location: Switzerland
Distribution: Fedora - RedHat - Mandrake - OpenSuse
Posts: 216

Rep: Reputation: 35
Hi there,

I might be asking something stupid, but: why do you want to change the name of your network card??? If this card is not a wireless device, then being called eth1 sounds perfectly correct. If this card is a wireless device, nothing stops you from connecting to a wireless router with it, even though it is called eth1.

Cheers
 
Old 12-16-2010, 03:39 AM   #3
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
Hello bentheman and welcome to LQ,

why do you want to change the name of your device?

The name eth0, eth1, wlan0 and so on are assigned by udev and normally it is not possible (not useful respectively) to change this. You know, wlan0 is the devicename for a wireless-adapter whereas eth0 is the devicename of an ethernet-adapter.

Is eth0 a wireless-adapter? please post the output of
Code:
iwconfig
and
Code:
ifconfig
Markus
 
Old 12-16-2010, 04:27 AM   #4
bentheman
LQ Newbie
 
Registered: Dec 2010
Location: Israel
Posts: 17

Original Poster
Rep: Reputation: 0
I want to change the name of the network card to support me in "aircrack"
And when I write "iwconfig"I see:
eth1 and all other settings (currently it is connected to a wireless network)
etho-no wireless extensions
And when I write "ifconfig"I see
eth0 ,mac address, packets, etc.
eth1-MAC address different
Last"lo" which listed some of the things :
Link enca: local loopback
inet addr: 127.0.0.1 mask: 255.0.0.0
ands some more..
Thanks for the quick response
 
Old 12-16-2010, 03:34 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 16,678

Rep: Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455
I think you have both a built in nic (shown) and a wireless )that is not currently working.)
 
Old 12-16-2010, 04:04 PM   #6
GardarS
Member
 
Registered: Jun 2005
Location: Reykjavik,Iceland
Distribution: Centos 5.6 and Arch
Posts: 64

Rep: Reputation: 17
Ok.. I don't really know if this works, but you could change the DEVICE section in your

Code:
/etc/sysconfig/networking/devices/ifcfg-eth1
But I can not guarantee that it works, I don't use wireless much myself, but you can try and see if it does something, I belief that this section sets the name of device but I might be way off.

It's easy to change it back if it doesn't go as hoped.

Last edited by GardarS; 12-16-2010 at 04:06 PM.
 
Old 12-16-2010, 09:30 PM   #7
reed9
Member
 
Registered: Jan 2009
Location: Boston, MA
Distribution: Arch Linux
Posts: 653

Rep: Reputation: 142Reputation: 142
Udev sets the device name as mentioned. You can have udev set it as you like.

Edit /etc/udev/rules.d/10-network.rules
Code:
SUBSYSTEM=="net", ATTR{address}=="ff:ee:dd:cc:bb:aa", NAME="wlan0"
Replace the address with your MAC address, and use lower case.
 
Old 12-19-2010, 01:06 AM   #8
bentheman
LQ Newbie
 
Registered: Dec 2010
Location: Israel
Posts: 17

Original Poster
Rep: Reputation: 0
Hi ,
i have tried this code : /etc/sysconfig/networking/devices/ifcfg-eth1
but the answer was : "bash:/etc/sysconfig/networking/devices/ifcfg-eth1:no such file or directory"
and about what reed9 Wrote, i didn't understand ,
as i mentioned above I'm pretty new with Linux
 
Old 12-20-2010, 04:38 AM   #9
bentheman
LQ Newbie
 
Registered: Dec 2010
Location: Israel
Posts: 17

Original Poster
Rep: Reputation: 0
Refreshing
 
Old 12-20-2010, 05:26 AM   #10
reed9
Member
 
Registered: Jan 2009
Location: Boston, MA
Distribution: Arch Linux
Posts: 653

Rep: Reputation: 142Reputation: 142
Quote:
Originally Posted by bentheman View Post
Hi ,
i have tried this code : /etc/sysconfig/networking/devices/ifcfg-eth1
but the answer was : "bash:/etc/sysconfig/networking/devices/ifcfg-eth1:no such file or directory"
and about what reed9 Wrote, i didn't understand ,
as i mentioned above I'm pretty new with Linux
These are all text configuration files. You can edit them with any text editor.

This
Code:
/etc/sysconfig/networking/devices/ifcfg-eth1
Is a path to a location, like C:\Documents and Settings\User\Photos\bob.jpg would be for example in Windows. (Except the above leads to a text file not a photo.)

You need to be root to edit system configuration files. A handy command line text editor is nano, which should be installed by default, so you could open the file as so
Code:
su -
nano /etc/sysconfig/networking/devices/ifcfg-eth1
The su - logs you in as root.

Same with the other
Code:
su -
nano /etc/udev/rules.d/10-network.rules
And put in the line
Code:
SUBSYSTEM=="net", ATTR{address}=="ff:ee:dd:cc:bb:aa", NAME="wlan0"
Where the ff:ee:dd:cc:bb:aa is your MAC address (but use lower case). Save the file and it should now name your interface wlan0 after rebooting.
 
Old 12-20-2010, 05:27 AM   #11
reed9
Member
 
Registered: Jan 2009
Location: Boston, MA
Distribution: Arch Linux
Posts: 653

Rep: Reputation: 142Reputation: 142
Quote:
Originally Posted by bentheman View Post
Refreshing
Patience. It was the weekend and sometimes we have more pressing things to do than hang out online.
 
Old 12-21-2010, 03:32 AM   #12
bentheman
LQ Newbie
 
Registered: Dec 2010
Location: Israel
Posts: 17

Original Poster
Rep: Reputation: 0
See attached screenshot , i did all things according to your instructions ,
i'd love opinions ,

Thanks again!!
Attached Thumbnails
Click image for larger version

Name:	Screenshot-1.jpg
Views:	54
Size:	126.9 KB
ID:	5592  
 
Old 12-21-2010, 05:22 AM   #13
reed9
Member
 
Registered: Jan 2009
Location: Boston, MA
Distribution: Arch Linux
Posts: 653

Rep: Reputation: 142Reputation: 142
1. You forgot closing quotes on your mac address. 2. I mentioned before, you need to use lower case letters for the mac.
 
Old 12-22-2010, 01:04 AM   #14
bentheman
LQ Newbie
 
Registered: Dec 2010
Location: Israel
Posts: 17

Original Poster
Rep: Reputation: 0
did it ,
i saved the file , and restarted ,
but nothing changed :/
 
Old 12-22-2010, 08:48 AM   #15
jwl17330536
Member
 
Registered: Feb 2010
Location: Raleigh, NC
Posts: 83

Rep: Reputation: 22
Did you rename the interface script file? /etc/sysconfig/network-scripts/ifcfg-eth1 --> /etc/sysconfig/network-scripts/ifcfg-wlan0
mv /etc/sysconfig/network-scripts/ifcfg-eth1 /etc/sysconfig/network-scripts/ifcfg-wlan0

Within /etc/sysconfig/network-scripts/ifcfg-wlan0 you should have the top line read: DEVICE=wlan0

And the /etc/udev/rules.d/10-network.rules should have: NAME="wlan0"

After all of that reboot

Last edited by jwl17330536; 12-22-2010 at 08:50 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to change the name of wlan0 to eth1 in ubuntu 8.04? christyyim Linux - Networking 3 03-19-2009 05:06 AM
change ipw220 interface name from eth1 to wlan0 zen0n Linux - Laptop and Netbook 3 08-23-2005 01:55 PM
wlan0 appears as eth1 and can't get an ip kovermours Linux - Wireless Networking 7 09-13-2004 04:55 PM
wireless eth1 to wlan0? ferreter Fedora 0 09-11-2004 02:19 PM
how do i rename wlan0 to eth1 laclac01 Linux - Networking 2 06-10-2004 05:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration