How to set a static IP in gOS

| | Comments (0) |

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

Tech Talk column

Steven Rosenberg's weekly Tech Talk column, which appears Saturdays in the Los Angeles Daily News, is now available on the Daily News Technology page.

About this blog

New ways to sign in to comment: I just added the ability for prospective commenters on this blog to sign in using their AOL, Yahoo! and Wordpress.com accounts (for the past 200 posts anyway ... more than that will take an extensive, middle-of-the-night rebuild). That's in addition to the other sign-in choices, which include starting a Movable Type account on this blog, Typekey, OpenID, Live Journal and Vox. If you have trouble getting your Movable Type account verified, or any of the other sign-in options are not working properly, please e-mail me. With these added ways of signing in, there's more reason than ever for you to make a comment (or several!).




Steven Rosenberg aims to learn what he does not know. He writes about it here.



About this Entry

This page contains a single entry by Steven Rosenberg published on November 23, 2007 9:37 AM.

gOS update -- it's made in L.A. ... and I'm finally downloading it was the previous entry in this blog.

The Kindle: powered by Linux is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Recent Comments

Powered by Movable Type 4.25

LXer

Links

Daily News technology
LXer
Distrowatch
Linus' Blog
David Pogue
BoingBoing
Linux Today
TuxRadar
Linux.com
Linux Planet
The Open Road
Linux Outlaws podcast
Dan Lynch
Fabian Scherschel
The VAR Guy
Larry the Free Software Guy
Chess Griffin
Linux Reality podcast
Desktop Linux
Practical Technology
Linux Devices
ZDNet
ZDNet U.K.
iTWire
CNet News
TechCrunch
The Register
Ars Technica
Reg Developer
Computerworld
Computerworld blogs
Steven J. Vaughan-Nichols at Computerworld
Debian
Planet Debian
Debian Forums
Debian News
debianHELP
debiantutorials.org
The Debian User
Wolfgang Lonien
Debian-News.net
Debian Administration
Debian Admin
Debian Weather
Ubuntu
Xubuntu
Kubuntu
Edubuntu
Gobuntu
Planet Ubuntu
Ubuntu Forums
Ubuntu Geek
Works With U
Dustin Kirkland
Ubuntu UK Podcast
Popey
gNewSense
CrunchBang Linux
OpenBSD
OpenBSD Journal
OpenBSD Ports
OpenBSD 101
Planet.OpenBSD.nu
jggimi's OpenBSD live CD
DaemonForums
BSDanywhere
Marc Balmer
Denny's OpenBSD blog
Polarwave's OpenBSD Tips and Tricks
Binary Updates for OpenBSD
Puppy Linux
Damn Small Linux
Tiny Core Linux
PCLinuxOS
Mandriva
Red Hat
Red Hat News
Red Hat Blogs
Red Hat: Truth Happens
Red Hat Magazine
CentOS
Planet CentOS
Fedora
Slackware
Slackbuilds
Robby's Slackware Packages
Slackblogs
dropline GNOME for Slackware
GNOME Slackbuild
GWARE - GNOME for Slackware
Wolvix
Zenwalk Linux
Vector Linux
Slax
Splack Linux — Slackware for Sparc
Nonux
How to Forge
marc.info BSD and Linux mailing list archive
FreeBSD
FreeBSD, the Unknown Giant
A Year in the Life of a BSD Guru
NetBSD
PC-BSD
DesktopBSD
DragonFlyBSD
DragonFlyBSD Digest
DesktopBSD
BSD Talk podcast
OpenSolaris
MilaX
BeleniX
DeLi Linux
Linux Loop
Electronista
Engadget
Gizmodo

Advertisement

Other blogs

Johnson Update in Inside USC with Scott Wolf
Has Bynum outgrown Kareem? in Inside the Lakers
Can the Angels just get to the end of this thing without an injury? in Farther Off the Wall
Neuheisel On: in Inside UCLA with Jon Gold
U.S. Roster for Final Two WCQ Announced in 100 Percent Soccer