📲 Download Our Apps

EMI Calculator

Download EMI Calculator

SOA Games

Download SOA Games

SOA Technology App

Download SOA Technology

BMI Checker

Download BMI Checker

Task Jira

Download Task Jira

Laughing Adda

Download Laughing Adda

📅 हिंदी कैलेंडर ऐप डाउनलोड करें

Download Shubhcalendar App

how to map ip address to domain name in ubuntu

ubuntu@nonames:/etc$  hostname --fqdn
nonames.com
ubuntu@nonames:/etc$

Setting your hostname:

  • You’ll want to edit /etc/hostname with your new hostname.
  • Then, run sudo hostname $(cat /etc/hostname).

Setting your domain:

  • Then, in /etc/resolvconf/resolv.conf.d/head, you’ll add then line domain your.domain.name (not your FQDN, just the domainname).
  • Then, run sudo resolvconf -u to update your /etc/resolv.conf (alternatively, just reproduce the previous change into your /etc/resolv.conf).

Both:

Finally, update your /etc/hosts file. There should be at least one line starting with one of your IP (loopback or not), your FQDN and your hostname. grepping out ipv6 addresses, your hosts file could look like this:

127.0.0.1 localhost
1.2.3.4 service.domain.com service
ubuntu@nonames:/etc$ hostnamectl
   Static hostname: nonames.com
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 0edddc7ee9394aec8b44c30670b611c5
           Boot ID: 4bdaebcdf36a487792fc02abf1a6b958
    Virtualization: xen
  Operating System: Ubuntu 18.04.3 LTS
            Kernel: Linux 4.15.0-1060-aws
      Architecture: x86-64



Leave a Reply

AI Spiritual Tools & Interactive Experiences

Explore powerful AI-driven tools for daily guidance, spirituality, fun quizzes, and self-discovery.

Today’s Quote

Get inspiring daily quotes powered by AI to motivate and guide your day.

Explore Now

AI Tarot Card Reader

Reveal insights about your future, love, and career with AI tarot readings.

Read Tarot

Love Match Calculator

Check compatibility and love predictions using AI-based analysis.

Check Match

Fortune Cookie

Open an AI fortune cookie and receive wisdom, luck, and fun messages.

Open Cookie

Quiz Categories

Engage with knowledge-based and fun quizzes across multiple categories.

Start Quiz

Panchang Calendar

View daily Panchang, auspicious timings, tithi, nakshatra, and festivals.

View Panchang

Online Numerology

Discover your destiny number, life path, and numerology predictions.

Calculate Now

Spiritual Feeds

Stay connected with spiritual thoughts, mantras, and divine content.

View Feeds

Quiz Hub

Attempt trending quizzes on GK, spirituality, festivals, and more.

Explore Quizzes