Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 03-18-2007, 01:07 AM   #1
LQ Newbie
Registered: Mar 2007
Posts: 2

Rep: Reputation: 0
missing /etc/resolv.conf

Hi peepholes,ive been checking out a few different flavours of Linux and im pretty much settled on Kubuntu 6.10 however when im running it off the CD i get a popup saying that /etc/resolv.conf is missing and to get the admit to create it.OK where does this file go,does it go in the Home folder,if not where does it go and how do i create it and install it?*Thankz*
Old 03-18-2007, 03:19 AM   #2
Registered: Dec 2005
Location: India
Distribution: Ubuntu Feisty Fawn
Posts: 107

Rep: Reputation: 15
The file resolv.conf should be default exist under /etc. You may just create it anyway if it doesn't exist,

[root@redux ~]$touch /etc/resolv.conf
You could then edit that file and enter your name servers as given below,


Or if your computer gets DNS information via DHCP then you could leave the file as it as.
Old 03-18-2007, 03:21 AM   #3
LQ Veteran
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.1, 14.2
Posts: 5,280

Rep: Reputation: 567Reputation: 567Reputation: 567Reputation: 567Reputation: 567Reputation: 567
I'm assuming from your post you are new to linux. No shame there, we were all new at some time.

You told me in your post where it goes. /etc/resolv.conf tells me. You just don't understand what this is saying. Linux uses a different way of naming things than windbloze. There is no C drive.
Gone, caput. There are hard drives, the naming starts with hda, the first drive, hdb the second, hdc the third and on it goes.

You can install linux on any drive and any partition you like. Unlike windbloze that needs to be installed on the first drive.

Once you install the system, the install process will put the system where you tell it to go. The file system starts at the root, and is shown by a '/' character. From here we make directories. One that gets made is called 'etc'. We show this as /etc If we had another directory inside etc, say we call it 'dir1' and I would show that as /etc/dir1 So, that first slash says "root of the file system" Notice this doesn't refer to hard drives. This could be on the first, second or third hard drive.

To navigate we use the command 'cd' ( without the quotes ). cd is just a short form of change directory. So if I want to navigate to the root directory, I would just type / and press enter. To change to etc from the root, I would type 'cd etc' .

Ok, so your question was
OK where does this file go,does it go in the Home folder,if not where does it go and how do i create it and install it?
The file goes in /etc and to create it you would use an editor on your system. Kununtu comes with several editors, as do most modern linux distros. Try one like 'kate' ( without the quotes ). There are others like vi or emacs. You need a plain text editor, not a word processor.

If you look from the start button ( the K in the bottom left corner ) probably under --> Applications --> Editors you will find it.

Now for some more linux stuff you need to know to get this done.

Linux uses permissions, unlike windoze where any user is allowed to destroy the system, ( ever windoze self destroys ) each file and directroy has an owner and permission assigned to each file and directory.

The root of the system is owned by the privledged owner 'root'. To edit the file, you need to get root privledges, or log in as root. During the install process, you create users, one for each locally attached huminoid that is going to use the system.

Root is the other guy, designed to save you from your self. To get root privledges, you open a konsole, and at the prompt, type 'su' and press enter. The system will prompt you with 'password' . You type the root password set up at install time, and press enter. If you give it the correct password, the prompt will change from a '$' to a '#'. At this point you care dangerous. You can now destroy the system; just like windoze.

So, do a cd / ( enter ). Now cd /etc and you will be in the correct location. Type kate ( enter ) to launch the application kate. Kate will give you a blank page, type your stuff, and save it as resolv.conf.

Now what goes in there? This is a file used by your TCP/IP stack to resolve names to IP addresses. What is usually in here is the IP addresses of your DNS servers. You ISP sets these addresses, and they are different for each ISP. Here is what mine looks like.

It is a plain text file, with just two lines. For you, you will need to find out the DNS addresses and change the dotted decimal part. That is about it.

On the live CD, you will have a /etc directory, but it is only in your systems memory, not on a hard drive. If you are connected through a router, most of them will pass the system the DNS addresses. In windoze there is a setting called 'automatic' That tells windoze to accept the DNS addresses from the router and use them. "Automatic" should tell you, 'Keep the user stupid, don't explain anything, and keep paying Billy lots of money.

Once you install to a hard drive, you can create the file as described above. You only need to do it once, unless you use too much root privilege and destroy it...

Hope this helps. It takes some time to learn linux. BTW, this stuff is not really specific to linux. Linux uses a standard TCP/IP stack like many other operating systems; including windoze. The difference is how you do the configuring. Brain dead 'automaitc' in a GUI or knowing what you are doing...
Old 03-18-2007, 04:16 AM   #4
LQ Newbie
Registered: Mar 2007
Posts: 2

Original Poster
Rep: Reputation: 0
Thankz guys,ill get this into my head shortly*i hope* and yes i am VERY new to Linux,ive only been playing around with a few live CDs for a bit over a week,and i know i have to forget how Windows works which *isnt* easy but windows can be a HUGE PITA from what ive seen of Linux im going to like it,i just need a bit of re educating.


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
DNS Hosts.conf or resolv.conf problem mac_casey SUSE / openSUSE 0 03-26-2006 09:21 AM
About /etc/resolv.conf satimis Linux - Networking 10 02-24-2006 09:30 PM
Who changes /etc/resolv.conf? lmp Debian 4 11-29-2005 08:08 AM
Resolv.conf correct or missing something? Lostboy7500 Linux - Networking 14 10-10-2004 04:15 AM
resolv.conf jmdlcar Slackware 9 05-15-2004 11:44 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:21 PM.

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