what is a localhost
So, to answer your question - yes, they are different. localhost is given an ip address in the 127.0.0.0 network and given to a virtual loopback network device lo. This device is present on all systems, regardless of whether they have a physical network device fitted (WiFi or Ethernet, for example).