Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

What is the loopback interface and how does it differ from the eth0 interface?

And why do I need to use it when mounting an ISO or running a service on localhost?

share|improve this question

1 Answer 1

up vote 9 down vote accepted

The loopback networking interface is a virtual network device implemented entirely in software. All traffic sent to it "loops back" and just targets services on your local machine.

eth0 tends to be the name of the first hardware network device (on linux, at least), and will send network traffic to remote machines. You might see it as en0, ent0, et0, or various other names depending on which OS you're using at the time. (It could also be a virtual device, but that's another topic)

The loopback option used when mounting an ISO image has nothing to do with the networking interface, it just means that the mount command has to first associate the file with a device node (/dev/loopback or something with a similar name) before mounting it to the target directory. It "loops back" reads (and writes, if supported) to a file on an existing mount, instead of using a device directly.

share|improve this answer
    
It would nice to add an example of actual example usage of mounting an iso using the loopback interface. I just got to this question by googling "iso loopback interface". –  Faheem Mitha Mar 28 '11 at 21:19
    
Just to clarify, the "loopback" option to mount (which creates a "loopback device" for a given file, as you can do with "losetup) is not related with networking. –  jjmontes Dec 26 '12 at 17:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.