FG
💻 Software

Why doesn't "hostname --fqdn" work on my Ubuntu computer?

Fresh5 days ago
Mar 15, 202640977 views
Confidence Score0%
0%

Problem

I'm using Ubuntu 10.04 LTS, and when I type the command , I get the message: . Because of this, I cannot install successfully, and get the following error when I try: My is below. Does anyone have any ideas on what this means and how I can fix this?

Error Output

Setting up global (5.7.1-1) ...
hostname: Name or service not known
dpkg: error processing global (--configure):
 subprocess installed post-installat…

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Why doesn't "hostname --fqdn" work on my Ubuntu computer?

Low Risk

Can you provide the content of ? It looks like /etc/nsswitch.conf has a bad value for the "hosts" line. Does it start with "files" ? Otherwise the FQDN is set by editing /etc/hosts and putting the FQDN on the line where the hostname appears. Suppose…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment