Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
3 edited tags
| link
2 added 140 characters in body
source | link

Here are details of the machine I want to access using its hostname:

$ hostname
hostname
$ cat /etc/hosts
127.0.0.1   localhost
127.0.1.1   hostname.company.local  hostname

It's a default Debian 6 (Squeeze) install, so I didn't fiddle with anything yet.

This is what I get from a machine (running Debian Unstable) trying to access above machine:

$ ping hostname
ping: unknown host hostname
$ ping hostname.company.local
ping: unknown host hostname.company.local
$ cat /etc/resolv.conf
nameserver 192.168.2.21
nameserver 192.168.2.51
search company.local

Here are details of the machine I want to access using its hostname:

$ hostname
hostname
$ cat /etc/hosts
127.0.0.1   localhost
127.0.1.1   hostname.company.local  hostname

It's a default Debian 6 (Squeeze) install, so I didn't fiddle with anything yet.

This is what I get from a machine trying to access above machine:

$ ping hostname
ping: unknown host hostname
$ ping hostname.company.local
ping: unknown host hostname.company.local

Here are details of the machine I want to access using its hostname:

$ hostname
hostname
$ cat /etc/hosts
127.0.0.1   localhost
127.0.1.1   hostname.company.local  hostname

It's a default Debian 6 (Squeeze) install, so I didn't fiddle with anything yet.

This is what I get from a machine (running Debian Unstable) trying to access above machine:

$ ping hostname
ping: unknown host hostname
$ ping hostname.company.local
ping: unknown host hostname.company.local
$ cat /etc/resolv.conf
nameserver 192.168.2.21
nameserver 192.168.2.51
search company.local
1
source | link

How to make a machine accessible from the LAN using its hostname

Here are details of the machine I want to access using its hostname:

$ hostname
hostname
$ cat /etc/hosts
127.0.0.1   localhost
127.0.1.1   hostname.company.local  hostname

It's a default Debian 6 (Squeeze) install, so I didn't fiddle with anything yet.

This is what I get from a machine trying to access above machine:

$ ping hostname
ping: unknown host hostname
$ ping hostname.company.local
ping: unknown host hostname.company.local