How Do I setup internet access in terminal window?

Where Penguins and Daemons chill together in the warmth of the Sun.

Moderators: SecretSquirrel, notfred

How Do I setup internet access in terminal window?

Postposted on Thu May 22, 2008 7:28 pm

If I were to setup the Ubuntu Server package, how would I get to the point in the terminal where I can logon to my wireless network?

I know that is an abnormal question as servers are not meant to move, or access the net wirelessly - but it is something I need to know, and I think that I am not putting in the right search parameters in Google as I am coming up with nothing.

Would anyone have an answer to my question?

Thank You.
. . . this is the digital projection of your mental self. . . .

Darth Lex-idius vs. Obi Lex kanobi
lex-ington
Minister of Gerbil Affairs
 
Posts: 2920
Joined: Fri Apr 25, 2003 9:59 pm
Location: Toronto, ON

Re: How Do I setup internet access in terminal window?

Postposted on Fri May 23, 2008 8:13 am

Are you pulling in an ip address? What kind of encryption is on the wireless? Are the drivers installed correctly?
Usacomp2k3
Gerbil God
 
Posts: 21240
Joined: Thu Apr 01, 2004 3:53 pm
Location: Orlando, FL

Re: How Do I setup internet access in terminal window?

Postposted on Fri May 23, 2008 9:52 am

Normal WEP encryption.

Ubuntu apparently has installed the correct drivers.

Let me explain - my brother is with Verizon in Tampa (Fiber Optic). They installed the modem and wireless router in his garage, so every computer in his house has to be wireless. Seeing that Ubuntu Server has no GUI (or we don't know how to get at a GUI to make the process easier), we are figuring this out as we go. Some things we know how to do from the terminal, others - like connecting to the network - we don't.

So . . .I am going to say that the Router will be giving his laptop an IP address, the encryption is your standard WEP, and that Ubuntu installed the right drivers since the hardware is not cutting edge (at least 2 years old now.)

Thanks.
. . . this is the digital projection of your mental self. . . .

Darth Lex-idius vs. Obi Lex kanobi
lex-ington
Minister of Gerbil Affairs
 
Posts: 2920
Joined: Fri Apr 25, 2003 9:59 pm
Location: Toronto, ON

Re: How Do I setup internet access in terminal window?

Postposted on Fri May 23, 2008 11:04 am

man interfaces
sudo apt-get install wireless-tools
man wireless
more /usr/share/doc/wireless-tools/README.Debian
man iwconfig

You can get it going by had through the use of iwconfig to get it associated to the access point and then dhclient to get the IP address. To get it to go automatically, you will need to fill in the details in /etc/network/interfaces
notfred
Grand Gerbil Poohbah
 
Posts: 3648
Joined: Tue Aug 10, 2004 9:10 am
Location: Ottawa, Canada

Re: How Do I setup internet access in terminal window?

Postposted on Fri May 23, 2008 11:21 am

As an example, for your interfaces file, you could do something like this (assuming your interface is wlan0):

iface wlan0 inet dhcp
wireless-essid ID
wireless-key KEY

then running "ifup wlan0" will bring the interface up by setting that key and ssid and trying to obtain a DHCP lease. Add a line "auto wlan0" and it will try to bring up the interface on boot. Similarly, ifdown wlan0 brings down the interface by releasing the DHCP lease. You can also configure a static IP by replacing dhcp with static and adding address/netmask/etc. lines. /etc/network/interfaces is part of the Debian-based higher-level network configuration scripts, but underneath the hood it is using the basic iwconfig and ifconfig tools.

To do the same thing manually, you'd use iwconfig:
iwconfig wlan0 essid "ID"
iwconfig wlan0 key KEY

iwlist wlan0 scan will do a scan for visible APs. If you get a message "interface doesn't support scanning : Network is down," run ifconfig wlan0 up (to bring the interface up and turn on the wireless).
bitvector
Grand Gerbil Poohbah
 
Posts: 3234
Joined: Wed Jun 22, 2005 3:39 pm
Location: Mountain View, CA

Re: How Do I setup internet access in terminal window?

Postposted on Fri May 23, 2008 1:28 pm

It may not be wlan0. May laptop has eth0 for the fixed and eth1 for the wireless. "ifconfig -a" will list all your interfaces and grepping through dmesg may help determine which is which.
notfred
Grand Gerbil Poohbah
 
Posts: 3648
Joined: Tue Aug 10, 2004 9:10 am
Location: Ottawa, Canada

Re: How Do I setup internet access in terminal window?

Postposted on Fri May 23, 2008 2:38 pm

notfred wrote:It may not be wlan0. May laptop has eth0 for the fixed and eth1 for the wireless. "ifconfig -a" will list all your interfaces and grepping through dmesg may help determine which is which.

Yes, which is why I specifically said "assuming your interface is wlan0" (because sometimes its ethX or wifiX or athX, etc.). It was simply for the purposes of the example. Running iwconfig without arguments will tell you which interfaces have wireless extensions.
bitvector
Grand Gerbil Poohbah
 
Posts: 3234
Joined: Wed Jun 22, 2005 3:39 pm
Location: Mountain View, CA

Re: How Do I setup internet access in terminal window?

Postposted on Sun May 25, 2008 5:45 pm

Ugh. They have fiber and then access it wirelessly? What a waste :P
Can you convince him to move the modem? :P

Anyway, you can also do an "sudo apt-get install gnome" and then boot into that when you want a gui by "startx". Note, if you want to have it boot by default not into gnome, you can "sudo update-rc.d -f gdm remove" which will remove the booting into gnome at startup.
^^That's how I had my web server setup.
Usacomp2k3
Gerbil God
 
Posts: 21240
Joined: Thu Apr 01, 2004 3:53 pm
Location: Orlando, FL


Return to Linux, Unix, and Assorted Madness

Who is online

Users browsing this forum: No registered users and 1 guest