Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.