@Nacho Bagui To really answer this question, you'd have to tell us what OS (or distribution of Linux) you're running. From the looks of the command you tried already, I'd guess you're running something that's Unix-like.
Try using the 'hostname' command at the command line:
[juser@ip-172-31-254-254 box]$ hostname
ip-172-31-254-254
…in this case, the string ip-172-31-254-254
is the hostname you can use in the browser to access Ambari.
Alternatively, you can try 'cat'-ing the /proc/sys/kernel/hostname
"file", like this:
[juser@ip-172-31-254-254 box]$ cat /proc/sys/kernel/hostname
ip-172-31-254-254
…again, the string returned by the operating system, ip-172-31-254-254
is the hostname. You may need to fully qualify it in the browser.
Bill Brooks, Community Moderator
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.