I'm trying to get the FQDN of the VPS I am using based on it's private IP. This is for the same VPS that I am logged into.
I'm able to find it by typing
Reason is I need this name to use as part of my script and I'm not sure how to get only the relevant portion. Is there maybe a different command that returns only the name?
I'm able to find it by typing
host 10.10.10.20
and it returns 20.10.10.10.in-addr.arpa domain name pointer vps.fqdn.name.
but I'm wondering if there's an easier way to get just the vps.fqdn.name
part?Reason is I need this name to use as part of my script and I'm not sure how to get only the relevant portion. Is there maybe a different command that returns only the name?