LinuxQuestions.org
Visit Jeremy's Blog.
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-13-2007, 03:29 PM   #16
sixleaf
LQ Newbie
 
Registered: Mar 2007
Posts: 16

Original Poster
Rep: Reputation: 0

hmm ok i should probably start a new thread for this but heyho. When i boot up into console, i have no network settings established, i have to startx, set network up (the settings always default to wrong ones every reboot), then exit again. How can i write a script or whatever to initialise the network adapter with the right ip, dns server, gateway etc etc. Also i move my computer between networks which is why a script would be good to change what settings.

I looked about and found http://www.cyberciti.biz/faq/linux-c...work-card-nic/ but it went a bit over my head cos i dont want to add alias's.

Thanks
 
Old 03-13-2007, 04:31 PM   #17
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
DHCP is usually used to setup cable connections (and other broadbands i think). The command is "dhcpcd" or something similar. It will start a DHCP client that will connect to the ISP's DHCP server, and request connection information, it will then use that to setup the connection.

If the command works on the console, just add it to your startup scripts.
 
Old 03-13-2007, 05:05 PM   #18
sixleaf
LQ Newbie
 
Registered: Mar 2007
Posts: 16

Original Poster
Rep: Reputation: 0
no no no i understand all about how dhcp works, networking is nothing new to me just linux is. but i don't want to use dhcp, i want to configure static IP, but the only way i've found of doing this is from the gui.

oh and fyi dhcpcd doesnt work for me.
thanks tho
 
Old 03-13-2007, 05:37 PM   #19
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
static ip? This is something i have never seen since i first came to Linux, using Core Linux... what a pain, but since you have a static IP, ill try to recall how this was done (since you know network things, ill let you fill in the blanks).

OK, the main command i saw was "iproute" (ok, the only command, or at least the only one i remember), used to setup the network routing table to connect to the outside. OK, thats all i recall, and also dhcpcd setups the /etc/resolve.conf for DNS queries. Since i was never able to get the network up the static way (probably because i dont have a static IP), i never bothered to really learn it, so thats about all i can say.

edit: ok, i looked at the commands that are installed now, no "iproute", but there is "ip" (might have been used), and "route", which i remember the output looks exactly like what i originally saw.

Last edited by SciYro; 03-13-2007 at 05:39 PM.
 
Old 03-13-2007, 05:55 PM   #20
PatrickNew
Senior Member
 
Registered: Jan 2006
Location: Charleston, SC, USA
Distribution: Debian, Gentoo, Ubuntu, RHEL
Posts: 1,148
Blog Entries: 1

Rep: Reputation: 48
Um, I think most modern distros are using ifconfig for this. If the card is eth0, then the command would be

Code:
ifconfig eth0 inet XXX.XXX.XXX.XXX
just replace the X's with an IP address. You'll almost certainly need root priviliges tho.
 
Old 03-13-2007, 06:10 PM   #21
shadowfx78
Member
 
Registered: Jun 2006
Distribution: Kubuntu, Xubuntu, Ubuntu
Posts: 60

Rep: Reputation: 15
I dont get why you would not want a gui? if your looking for a low impact distro check out xubuntu.
 
Old 03-13-2007, 07:07 PM   #22
SlowCoder
Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Fedora (Desktop), CentOS (Server), Knoppix (Diags)
Posts: 934

Rep: Reputation: 38
Quote:
Originally Posted by Avatar
The One Page Linux Manual: A concise summary of Linux console commands and what they are for
(PDF) http://homepage.powerup.com.au/~squa...nux_manual.pdf
Avatar,

Most excellent resource! Thanks for pointing it out.
 
Old 03-13-2007, 11:22 PM   #23
shadowfx78
Member
 
Registered: Jun 2006
Distribution: Kubuntu, Xubuntu, Ubuntu
Posts: 60

Rep: Reputation: 15
be aware that one page command thing is for an rpm based distro and many of the commands aren't compatible with debian based distros
 
  


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
Stumped ! CastleBrie General 3 03-24-2006 01:36 PM
Stumped: BIOS not seeing SATA's, can't install linux or windows randon General 2 11-04-2005 10:49 AM
Stumped by LAN tireseas Linux - Networking 7 03-17-2005 02:33 AM
how to im stumped rocketgo Linux - Software 8 11-10-2003 11:10 PM
really has me stumped! brunogartner Linux - Newbie 4 06-30-2003 06:43 AM


All times are GMT -5. The time now is 01:26 AM.

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