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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I'm a relatively inexperienced with Linux, coming from a Windows background, and I struggling to solve a troublesome issue attempting to set a static ip address to a Live Debian USB Key. I know it is possible to utilise the 'ifconfig' function to set a static ip address and use 'route' to set the gateway, e.g.
ifconfig eth0 10.0.0.40 up
route add default gw 10.0.0.130 eth0
..however in both cases I need to explicitly set the 'eth0' to point at the appropriate adapter. However, this is where my problem is...
I'm creating a persistent USB key using the Debian Live CD, I'm going to create an image and then duplicate that image to a load of other USB keys. Again, not a problem as such but there are cases where I need to specify a static IP address and gateway rather than using DCHP.
And here's where problem raises its head.
Because I've created the key on another machine it has allocated 'eth0' to a specific MAC Address (assigned in /etc/udev/70-persistent-net.rules) but when I place it into machine with a different network adapter it is assigning to 'eth1' (and this increments up).
Ideally, if someone could point me in the right direction to either...
a) call 'ifconfig' and 'route' without having to identify the adapter or
b) change the script that is creating '/etc/udev/70-persistent-net.rules' so it overwrites the 'eth0' entry with the only applicavle network adapter for the current hardware.
...or any other solution that would be beneficial. Thank you for your time...
If you delete /etc/udev/70-persistent-net.rules on the key then a new one will be created automatically during boot -- hopefully containing only eth0 for the MAC address of the current computer. If you want to use the key in several computers you could modify the shutdown scripts to delete /etc/udev/70-persistent-net.rules during shutdown.
Thank you to you all for the advice. After some reading and playing the best direction was to simply delete the 70-Persistent file, in this case the file is created again and ties into the eth0 identifier.