Post Closed as "duplicate" by msp9011, Thomas, schily, Jesse_b, jimmij of
3 spelling
source | link

I'm learning about networking, at home I have two physical machines and a bunch of VM'sVMs that I use to test my applications each machine has a different hostname and I map them manually in each /etc/hosts files

I would like to know what's the difference between home IP adress (127.0.0.1) and a real IP address given by the network in /etc/hosts

for example

let's say my IP address is 192.168.2.20 and the name host is naruto and my /etc/hosts looks like this:

127.0.0.1       localhost
192.168.2.20    naruto
127.0.0.1       naruto

all lines point to the same machine I understand that the main difference is how programs connect to each of them two are using loopback device and the other one is using a nic. my question is should I have all these lines? or what lines should I have? what's the use of each of them?

I was reading this post but it didn't help, I got more confused

I'm learning about networking, at home I have two physical machines and a bunch of VM's that I use to test my applications each machine has a different hostname and I map them manually in each /etc/hosts files

I would like to know what's the difference between home IP adress (127.0.0.1) and a real IP address given by the network in /etc/hosts

for example

let's say my IP address is 192.168.2.20 and the name host is naruto and my /etc/hosts looks like this:

127.0.0.1       localhost
192.168.2.20    naruto
127.0.0.1       naruto

all lines point to the same machine I understand that the main difference is how programs connect to each of them two are using loopback device and the other one is using a nic. my question is should I have all these lines? or what lines should I have? what's the use of each of them?

I was reading this post but it didn't help, I got more confused

I'm learning about networking, at home I have two physical machines and a bunch of VMs that I use to test my applications each machine has a different hostname and I map them manually in each /etc/hosts files

I would like to know what's the difference between home IP adress (127.0.0.1) and a real IP address given by the network in /etc/hosts

for example

let's say my IP address is 192.168.2.20 and the name host is naruto and my /etc/hosts looks like this:

127.0.0.1       localhost
192.168.2.20    naruto
127.0.0.1       naruto

all lines point to the same machine I understand that the main difference is how programs connect to each of them two are using loopback device and the other one is using a nic. my question is should I have all these lines? or what lines should I have? what's the use of each of them?

I was reading this post but it didn't help, I got more confused

2 code format
source | link

I'm learning about networking, at home I have two physical machines and a bunch of VM's that I use to test my applications each machine has a different hostname and I map them manually in each /etc/hosts files

I would like to know what's the difference between home IP adress (127.0.0.1) and a real IP address given by the network in /etc/hosts

for example

let's say my IP address is 192.168.2.20 and the name host is naruto and my /etc/hosts looks like this:

127.0.0.1 localhost 192.168.2.20 naruto 127.0.0.1 naruto

127.0.0.1       localhost
192.168.2.20    naruto
127.0.0.1       naruto

all lines point to the same machine I understand that the main difference is how programs connect to each of them two are using loopback device and the other one is using a nic. my question is should I have all these lines? or what lines should I have? what's the use of each of them?

I was reading this post but it didn't help, I got more confused

I'm learning about networking, at home I have two physical machines and a bunch of VM's that I use to test my applications each machine has a different hostname and I map them manually in each /etc/hosts files

I would like to know what's the difference between home IP adress (127.0.0.1) and a real IP address given by the network in /etc/hosts

for example

let's say my IP address is 192.168.2.20 and the name host is naruto and my /etc/hosts looks like this:

127.0.0.1 localhost 192.168.2.20 naruto 127.0.0.1 naruto

all lines point to the same machine I understand that the main difference is how programs connect to each of them two are using loopback device and the other one is using a nic. my question is should I have all these lines? or what lines should I have? what's the use of each of them?

I was reading this post but it didn't help, I got more confused

I'm learning about networking, at home I have two physical machines and a bunch of VM's that I use to test my applications each machine has a different hostname and I map them manually in each /etc/hosts files

I would like to know what's the difference between home IP adress (127.0.0.1) and a real IP address given by the network in /etc/hosts

for example

let's say my IP address is 192.168.2.20 and the name host is naruto and my /etc/hosts looks like this:

127.0.0.1       localhost
192.168.2.20    naruto
127.0.0.1       naruto

all lines point to the same machine I understand that the main difference is how programs connect to each of them two are using loopback device and the other one is using a nic. my question is should I have all these lines? or what lines should I have? what's the use of each of them?

I was reading this post but it didn't help, I got more confused

1
source | link

how to configure /etc/hosts properly

I'm learning about networking, at home I have two physical machines and a bunch of VM's that I use to test my applications each machine has a different hostname and I map them manually in each /etc/hosts files

I would like to know what's the difference between home IP adress (127.0.0.1) and a real IP address given by the network in /etc/hosts

for example

let's say my IP address is 192.168.2.20 and the name host is naruto and my /etc/hosts looks like this:

127.0.0.1 localhost 192.168.2.20 naruto 127.0.0.1 naruto

all lines point to the same machine I understand that the main difference is how programs connect to each of them two are using loopback device and the other one is using a nic. my question is should I have all these lines? or what lines should I have? what's the use of each of them?

I was reading this post but it didn't help, I got more confused