LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-23-2014, 11:59 AM   #1
AlexBB
Member
 
Registered: Mar 2014
Posts: 444

Rep: Reputation: Disabled
FQDN in Ubuntu


My environment is Windows 7==>Oracle Virtual Box==>Ubuntu. I am still struggling with FQDN. I posted on the subject previously here.

Well, after some reading and contemplations I figure that I need to enter a couple of lines in the file /etc/hosts.

The result is in the first thumbnail. I used the lines the user chrism01 gave to me:

Quote:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
Then I updated the system and so what? An attempt to install Gfortran gives me the same error: "I need a FQDN."

Why do people give me suggestions that do not work?

The result of the attempt to install GFortran is in the second thumbnail.

Can I get sensible, detailed instructions from someone who knows how to do it?

Thanks, - Alex
Attached Thumbnails
Click image for larger version

Name:	AAAA.png
Views:	18
Size:	103.4 KB
ID:	15040   Click image for larger version

Name:	AAAAA.png
Views:	15
Size:	102.3 KB
ID:	15041  
 
Old 03-23-2014, 01:40 PM   #2
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
Quote:
Originally Posted by AlexBB View Post
The result is in the first thumbnail. I used the lines the user chrism01 gave to me:
You misunderstood that, it was just an example of lines in /etc/hosts.
It seems to me that you know very little about networking, fqdn and such. That wiki page chrism01 linked to is good but probably a bit over your head. I'll try to be very clear:
In /etc/hosts you add entries that are supposed to be resolved, it is like a small DNS server. If you add a line "192.168.1.2 www.yahoo.com" to /etc/hosts and then in a browser writes url "www.yahoo.com" you will not get Yahoo - you'll reach a server with ip 192.168.1.2.
Some applications, like apache, searches /etc/hosts for a fqdn.
The actual hostname your computer has is written in /etc/hostname (Using LinuxMint now).

Now, looking at your pictures, your second snapshot tells me what you need: "The hostname -f returned ..."
"hostname -f" reads from /etc/hostname not /etc/hosts

So you need to do this:
Set a correct hostname, edit /etc/hostname and restart network or use some GUI-tool to change the hostname. (Don't know what tools Ubuntu has.)
Then try installing again - you could use "sudo apt-get -f install"
 
Old 03-23-2014, 09:00 PM   #3
AlexBB
Member
 
Registered: Mar 2014
Posts: 444

Original Poster
Rep: Reputation: Disabled
pingu, Thank you very much. I actually have a domain name, I figured, which is my last_name.org. I use it for emailing. Can I sue that?

I appreciate a thorough explanation though. Thanks, - Alex
 
Old 03-24-2014, 02:06 AM   #4
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
Well, then you could use a fqdn like "alexb.last_name.org"
 
Old 03-24-2014, 02:28 AM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,374

Rep: Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383
Those 2 lines I gave above are for the machine to talk to itself (yes, that's not a typo).
Certain processes use that info, so do keep those at the top of /etc/hosts, then append any other reqd lines.

In your case it looks like Ubuntu provides the equivalents already, plus others.
Do ensure you don't have duplicate entries.

Last edited by chrism01; 03-24-2014 at 02:31 AM.
 
Old 03-24-2014, 10:12 PM   #6
AlexBB
Member
 
Registered: Mar 2014
Posts: 444

Original Poster
Rep: Reputation: Disabled
pingu and chrism01, thank you very much. - Alex
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
FQDN ubuntu VPS Juc1 Linux - Newbie 2 03-22-2013 07:17 AM
need FQDN please Mufasa Linux - Networking 3 04-11-2010 01:57 PM
nn and fqdn andrew.46 Slackware 0 01-02-2009 10:53 PM
ip as my fqdn? sortia Linux - Networking 6 04-27-2005 09:46 AM
Fqdn ziox Linux - Networking 0 10-06-2004 05:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration