echo $(ifconfig eth0 | awk '$1 == "inet" {print $2}') \
$(nslookup $(ifconfig eth0 | awk '$1 == "inet" {print $2}') | \
awk '{ print $4; exit }') $(hostname) >> /etc/hosts
Last active
June 18, 2019 08:33
-
-
Save lenosi/48b96c590ec38cac01434a74efa839ed to your computer and use it in GitHub Desktop.
Fix hostname address with FQDN
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment