hosts - settings right ?!? | |
|
|
Moderator Linux-Dude Posts: 1187 Registered: 2006-11-23 | I run some commands:
[amsoft@gawab:~]$ cat /etc/hosts
127.0.0.1 gawab.com gawab localhost
[amsoft@gawab:~]$ cat /etc/domainname
gawab.com
[amsoft@gawab:~]$ cat /etc/hostname
gawab
[amsoft@gawab:~]$ uname -n
gawab
[amsoft@gawab:~]$ hostname -a
gawab localhost
[amsoft@gawab:~]$ hostname -s
gawab
[amsoft@gawab:~]$ hostname -d
com
[amsoft@gawab:~]$ hostname -f
gawab.com
[amsoft@gawab:~]$ cat /proc/sys/kernel/hostname
gawab
[amsoft@gawab:~]$
is all fine ?
or this:
[amsoft@gawab:~]$ su
Password:
[root@gawab:/home/amsoft]# hostname gawab.com
[root@gawab:/home/amsoft]# cat /proc/sys/kernel/hostname
gawab.com
|
|
|
|
|
|
Re: hosts - settings right ?!? | |
|
|
Administrator Posts: 426 Registered: 2004-09-09 | The fully-qualified domain name (FQDN) usually consists of 3 levels or more, e.g. example.gawab.com. /etc/hostname would have to contain "example" and /etc/hosts "127.0.0.1 example.gawab.com example localhost". hostname -f would result in "example.gawab.com", then.
If you want to use just gawab.com as FQDN, you should set /etc/domainname to just "com" and leave everything as is. |
|
|
|
|
|