Linux - Wireless NetworkingThis forum is for the discussion of wireless networking in Linux.
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.
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 am fairly new to commandline in shell but have been learning a fair bit already. One problem that's been bothering me though is how to connect to my access point through my wlan0 via the command line. How do I go about establishing that connection?
You haven't provided a lot of details. You can control a wireless device directly with "iwconfig". This program is similar to ifconfig, but you can also set the channel, ssid, etal. For wireless encryption, wpa_supplicant is used.
Normally the information needed for these two programs are contained in the /etc/sysconfig/network/ifcfg-wlan0 file, including the PSK. Editing the file with the correct values and running "ifup-wlan0" will connect you to your AP.
Your system may use a different location for the ifcfg-<device> files. Maybe /etc/sysconfig/networking/ for example.
On some systems, a script in /etc/ somewhere will contain iwconfig & ifconfig commands when you boot and the config file may not be used.
These programs, and even the config files have their own manpages. "man ifcfg" for example will provide information on what the config file contains.
Last edited by jschiwal; 09-02-2008 at 11:28 PM.
Reason: fixed typo
All I want to be able to do is establish a connection with an AP via commandline rather than through a Wireless Assistant GUI. I guess it is not that simple via commandline and there is no one-line command that will just connect as I am expecting. I guess I need to search and read up on how NIC connect to AP's to better understand the process.
As jschiwal says, you "haven't provided a lot of details".
Please tell us your distro, or even better, edit your LQ profile (at the left, see mine? The link is to the right - under "My LQ") so it tells us, as different distros do networking completely differently from the command line.
Quote:
All I want to be able to do is establish a connection with an AP via commandline rather than through a Wireless Assistant GUI. I guess it is not that simple via commandline and there is no one-line command that will just connect as I am expecting
It's usually very simple, and I do it all the time with just a one-line command, but we need to know your distro (Eg Ubuntu 8.04, or whatever, NOT just "lunux 5" (sic)) to be able to help you help yourself.
It's usually very simple, and I do it all the time with just a one-line command
Do you? I have been using Linux for years now and I still haven't figured out how, regardless of the distro. By the way, in my case that's Opensuse 11, although iwconfig, networkmanager and such commands aren't distro-specific at all... Anyway, I would really appreciate it if you could tell me your one-line command (whatever distro you're using). Thanks.
Note that the commands are essentially the same across distros, but the configuration files have two systems / locations - the Fedora / RedHat system and the Debian / Ubuntu system. I think Suse follows the former, but you'll soon find out.
Once the configuration files are correct, the one-liner to use (as root) is
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.