Link to home
Start Free TrialLog in
Avatar of jamie_lynn
jamie_lynn

asked on

What is the command to get the FQDN in SLES?

Hi

What is the command to get the FQDN (fully qualified domain name) in SLES?
'hostname -f' is returning me 'localhost', what I want is abchost.corp.com

Thanks
Jamie
ASKER CERTIFIED SOLUTION
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Can you try:
hostname -A

Open in new window

It does not need to be in /etc/hosts. It can also be in the dns server to get the right entry of hostname --fqdn

What is in your /etc/hosts and what in your /etc/nsswitch.conf?