What is the command to find DNS in Linux?

How do I find the DNS name of the server?

I have been working on a project that uses both TCP and HTTP.

The server I'm working on connects to an upstream TCP/HTTP server, does some work, and then sends the result to another server. I need to figure out the upstream DNS name, so I can connect to it via TCP.

The way I thought this would work was this: The upstream server listens on port 80. The upstream server needs to be able to identify itself to the upstream client by UDP broadcast, right? How do I find the upstream DNS name? Do I have to configure the upstream server or is there a tool for this? Update: I think this may be completely irrelevant because I'm not using DNS at all. The upstream server has a unique IP address on port 80 and all traffic from the upstream client will be sent there.

DNS isn't used to identify servers. DNS is used to resolve hostnames to IP addresses.

What you want is to have your server connect to an upstream server and then communicate with that upstream server by TCP. If your upstream server is publicly available, then you would connect to it on a publicly accessible port. You can also have an upstream server listen on a non-publicly accessible port and then relay messages back to the server. Your example server is not really doing any kind of "upstream" communication. The server is sending a response to the upstream server. The only "upstream" communication you're doing is between your server and the upstream server.

How do I find my DNS name in terminal?

mongy: apt-cache policy ubuntu-drivers-common.

jelly: its installed and I am not using it and have only one usb attached. I am gonna just stick with bionic for a while then. But thanks
"uname -a" should tell you the host name of your machine. mongy: I'm sure it'll change when we get some time to do a proper release. :-) tomreyn: uname not installed on live cd. mongy: I'd try the netplan interface names. mongy: is there any reason it would not be installed? I thought that as soon as I start it should detect the network. Thats a big fail then.
netplan seems to be using enp0s25 instead of enp8s0. which is wrong. mongy: then you must either (a) not have networking enabled on the live system or (b) not have networking configured properly. mongy: which file are you referring to exactly? this is a very confusing error message. I'd say that no matter what system it comes from, the installer did not detect a network device named 'enp0s25'. but enp8s0 has the same problem: it's named but not present. tomreyn: /etc/netplan/configuration.yaml mongy: what are you looking at exactly, the YAML? (yes YAML files will have version numbers assigned.

Related Answers

What is DNS and why is it used?

DNS (Domain Name Service) is a network protocol which translates human readable hos...

What is the domain name server?

Domain name server is a small program (server) on a personal c...

What is an example of DNS?

The perfect question for a Webmaster! The Domain...