How to set a static IP in gOS
The folks who are developing gOS -- the Ubuntu-derived Linux distribution for the $199 Everex PC being sold at Wal-Mart -- have a few things to fix.
It's very clear that gOS and the Everex are meant for home use with an Ethernet connection. I haven't tried it with wireless since I don't have a wireless-capable box that it would work on, but I do have to set wired static IP address regularly at the Daily News.
But in gOS, there's no GUI or text-based utility for network configuration.
Not a good thing.
But since I've set a static IP at the console about a dozen times lately, I'm growing accustomed to it. Will the new-to-Linux user be able to do this? Or want to? Hell no.
At any rate, if you need to configure a static IP in gOS 1.0.1, here's how. Start with this n.great Ubuntu Geek explanation.
I usually do the commands individually, but editing these two configuration files is a better way, I think:
You need to use a terminal window and text editor. And since root is not enabled in Ubuntu, you also need the sudo command to invoke rootly privileges. Vi is always available, but most systems -- Ubuntu and gOS included -- also offer nano. Remember, in nano you save your file by hitting F3 and then Enter. To exit nano, hit CTRL-x.
(I tend to use nano because it's easier than vi, and if I spent six hours a day at the console, I'd probably use vi, but since I don't, nano matches the way I work in a GUI that much more.)
Back to the configuration. First edit /etc/network/interfaces:
To open a terminal in gOS, right-click with the mouse and go to Applications - System Tools - UXterm
That opens a terminal window.
At the $ prompt (it may consist of different words but will end in $) type:
ubuntu@Ubuntu:~$ sudo nano /etc/network/interfaces
Find your network interface. If you've ever configured an IP address in Linux before with a GUI interface, you probably know what your interface is called. My Ethernet interface is eth0. Chances are yours is, too, but it may be different.
In gOS, go to this part of the file:
auto eth0
iface eth0 inet dhcp
Comment out the second line by putting a # in front of it. That makes your system "ignore" the line. You can always remove the # sign later and comment out the OTHER lines if you need to change back to a dynamic IP (the kind you usually have with a home DSL modem).
auto eth0
#iface eth0 inet dhcp
Now add a new line after the commented-out line (the one with the #) and add the information for your static IP connection, which you might know from previous configurations, your ISP (if you have a static IP connection, of course) or from the geek who administers your network. Remember, these numbers are for demonstration purposes; add the numbers provided to you by your network administrator (or which you already know), or it won't work:
auto eth0
#iface eth0 inet dhcp
iface eth0 inet static
address 192.9.200.200
netmask 255.255.255.0
broadcast 192.9.200.255
gateway 192.9.200.254
(Note: the original tutorial from which I adapted this calls for a "network" address in the configuration. That's a parameter I don't need, so I didn't include it here. Also, the "broadcast" address might not be needed, either, but in my case I know it, so I included it here. Your configuration may vary, but this is definitely the place it lives in Debian, Ubuntu and all those distros derived from them).
We still have one thing to do: setting the nameservers.
It's in another configuration file -- /etc/resolv.conf -- that we can access from the terminal with a text editor:
ubuntu@Ubuntu:~$ sudo nano /etc/resolv.conf
I don't seem to need a search address, but it you have it, you can put it in the file along with the addresses of your DNS servers. Add these lines to /etc/resolv.conf:
search search.com
nameserver 192.9.200.7
nameserver 192.9.200.4
Save the file (F3 and Enter in nano) and exit (CTRL-x).
Then restart your network:
ubuntu@Ubuntu:~$ sudo /etc/init.d/networking restart
If you need more information (and who doesn't?), here's a great tutorial -- probably better than this one -- on how to take a Ubuntu box from dynamic IP to static IP. For more complicated setups, this page may help. Hey, that nixCraft site is pretty good.
Editorial commentary: Ubuntu has a great utility that lets you configure dynamic or static IPs and quickly switch between them -- say if you have a laptop and use it at home and at work (like I do). Why gOS doesn't have this utility (or why I can't seem to find it) is beyond me. The developers should add it -- or something even easier to work with -- at the earliest opportunity. I know "real geeks" always configure their networking from the command line, but nobody should have to, especially in a distribution that's meant for first-time Linux users who aren't necessarily technically savvy. I know that Windows doesn't make configuring a static IP any easier than your average Linux distro, but a GUI app like those in Ubuntu or Debian, or the great netconfig utility in Slackware is a MUST. All you really need to do is add in the network configuration utility from Ubuntu. Just get it done, gOS people.





Leave a comment