LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 04-21-2008, 09:21 AM   #1
MassimoR
LQ Newbie
 
Registered: Apr 2008
Posts: 2

Rep: Reputation: 0
Static IP on Ubuntu


Hello,
I'm using Ubuntu for the first time, I would like learn to use Ubuntu.
I need to put Static IP on my Ubuntu PC. I tried to use the common and grafic ubuntu metod, but the PC doesn't work. Then I used the "ifconfig eth1..." also. Could you suggest me how I can give to ubunto a static address, static gateway, and static DNS?

Thanks
Massimo
 
Old 04-21-2008, 09:55 AM   #2
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
Via the graphical tool (under administration->network or something like that), this is as easy as putting the adresses in the form.
On the command line you need to know the name of your network interface. If it is eth0, just type: ifconfig eth0 inet X.X.X.X netmask 255.255.255.0 up
Replace X.X.X.X with your adress.
For DNS, edit /etc/resolv.conf and add or edit the line:
nameserver Y.Y.Y.Y
where Y.Y.Y.Y is the adress of your DNS.
 
Old 04-22-2008, 03:29 AM   #3
MassimoR
LQ Newbie
 
Registered: Apr 2008
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks Agrouf,

I just finish to configure the interface, and the PC now is OK.

Thanks a lot
Massimo
 
Old 04-22-2008, 04:16 AM   #4
andoni
LQ Newbie
 
Registered: Sep 2007
Posts: 8

Rep: Reputation: 0
Also, you could look this: "less /etc/network/interfaces"

Regards.
 
  


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
How to initialize a static array of a class in a static member function lali.p Programming 9 02-16-2008 10:27 AM
Making a static lib from objects + static libs kovacsp Programming 2 12-19-2007 01:53 PM
Howto Assign Multiple Static Public IP Addresses under SBC's PPPoE Static Ip system o trekgraham Linux - Networking 8 04-17-2007 11:51 AM
Ubuntu 6.06 Server(Assigning Static IP) TechMansoor Linux - Networking 4 12-18-2006 03:26 PM
FC2 Overriding static if in favor of dhcp system set for static pkraus109 Linux - Networking 8 09-21-2004 12:13 PM


All times are GMT -5. The time now is 02:59 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