cancel
Showing results for 
Search instead for 
Did you mean: 

FqDN in suse linux

pnagar
Participant
0 Kudos
3,256

Dear Experts,

What is the command to check the FQDN in suse 12.

mynynachau
Community Advocate
Community Advocate
0 Kudos

Thank you for visiting SAP Community to get answers to your questions. Since you're new in asking questions here, I recommend that you familiarize yourself with https://community.sap.com/resources/questions-and-answers (if you haven't already), as it provides tips for preparing questions that draw responses from our members. For example, you can outline what steps you took to find answers (and why they weren't helpful), share screenshots of what you've seen/done, make sure you've applied the appropriate tags, and use a more descriptive subject line. The more details you provide, the more likely it is that members will be able to assist you. You should also make sure you're using all the appropriate tags, so the right experts can find your question.

Should you wish, you can revise your question by selecting Actions, then Edit (although once someone answers your question, you'll lose the ability to edit the question -- but if that happens, you can leave more details in a comment).

Finally, if you're hoping to connect with readers, please consider adding a picture to your profile. Here's how you do it: https://www.youtube.com/watch?v=F5JdUbyjfMA&list=PLpQebylHrdh5s3gwy-h6RtymfDpoz3vDS . By personalizing your profile with a photo of you, you encourage readers to respond.

Best regards

Mynyna

SAP Community moderator

Accepted Solutions (1)

Accepted Solutions (1)

sumitjais
Active Contributor

Hi Prashant,

The correct command is hostname -f OR hostname --fqdn only

You are getting only hostname with the command hostname -f because your setting at /etc/hosts file is not in correct format.

The correct format is -

IP-Address Full-Qualified-Hostname Short-Hostname

If your /etc/hosts file has entry

xx.xx.xx.xx hanasfdev hanasfdev.xyz.abc (Optional : can have list of alias too )

the same command will read the middle term and output will be same as you got.

Check your /etc/hosts . It should be

xx.xx.xx.xx hanasfdev.xyz.abc hanasfdev

Answers (2)

Answers (2)

MichaelTe
Contributor
0 Kudos

Under SuSE you can set the hostname with the following command as root:

hostnamectl set-hostname <new FQDN>
pnagar
Participant
0 Kudos

Dear michael.teubner

i am not setting the hostname rather i want to query my FqDN

MichaelTe
Contributor
0 Kudos

If the first command responses only with

hanasfdev

then a FQDN is not set on your box.

MichaelTe
Contributor
0 Kudos

Hello,

hostname -f

Regards,

Michael

pnagar
Participant
0 Kudos

But in my case its only returning the hostname as below.