Archive

Posts Tagged ‘Linux’

Wifi at boot

August 7th, 2008 No comments

Some people may have noticed that wifi doesn’t exactly turn itself on until the user has logged in to the desktop. That’s a problem for some users. How is it a problem? It gets in the way of remote administration.

If I’m at work and am remotely logged in to my home PC (via SSH, for example) then there may come a time when I want to reset my PC. If my wireless does not turn itself on when the PC turns on then I end up with a PC turned on at home, not connected to the internet, and no one around to log in for me.

Note: In the following example, your wifi card may not be recognized as “wlan0″. Type “ifconfig” to see what yours may be. Substitute whatever yours is in place of wlan0.

How do you connect to a wireless access point from the command line?

First, you “turn on” your wireless card

sudo ifconfig wlan0 up

Now you should be able to

sudo iwlist wlan0 scan

which will show you all the wifi access points within range. The wifi card needs to know which access point to connect to. This is done by

sudo iwconfig wlan0 essid WhateverAPYouAreConnectingTo

and if it uses a (WEP) key then set the key

sudo iwconfig wlan0 key WhateverTheKeyIs

But you’re not connected yet. You need to establish the PC’s IP address within the network

sudo dhclient

and you’re set. You should see “bound to 192.168.x.x — renewal blah blah blah” as the last line. Test the connection

ping google.com

and you see that packets are being transmitted and received.

So how do you set that automatically? Stick the commands in your /etc/rc3.d/S99rc.local file, at the very bottom.

...blah blah...
esac

# Added on this date to get wifi on bootup
ifconfig wlan0 up
iwconfig wlan0 essid WhateverMyAccessPointIsCalled
iwconfig wlan0 key WhateverMyKeyIs
dhclient

Now every time you restart your computer, your computer will be connected to the network before you even log in.

Take a look at this article for some explanation of what rc.d scripts do.

Why Linux?

May 27th, 2008 No comments

I use Ubuntu as my flavor of Linux. I started with Red Hat 5 and quickly moved along to Ubuntu Hoary Hedgehog (v5.04). I’d been, up to that point, strictly a Windows user. So why Linux?

For one, the professor I was working for at the time had as little to do with Microsoft products as she possibly could. She required me to use the Red Hat that she provided. After becoming victim to a rootkit (I knew little about keeping Red Hat up-to-date) we switched to Ubuntu and I’ve loved every minute of it. For the record, I dabbled a little in OpenSuse but I felt it never had the ease of use or the community that Ubuntu did.

If you’re reading this, I presume you are a student. As a student you’re supposed to stereotypically be short on cash. I know, you’ve probably never bought Windows or Office in your life. If you own a computer, you’re probably wrong. The laptop you bought, if it wasn’t already running Mac or Linux, was shipped with Windows pre-installed. The high price you paid? That went toward the Microsoft licenses so you could use Windows on the laptop.

Linux is free. It’s free in more ways than one. Not only are you free to use the software without paying a cent but the philosophy behind the operating system is that the source code is free, too. It’s not hidden behind layers of obscurity but instead the stuff that makes the program work is made available for you, as a student, to learn from. You can see what another developer did to make the software do what it’s doing. It’s no wonder colleges and universities teach computer science on the Gnu/Linux platform in the first place.

Being a computer science student this operating system is tailor made for you. I didn’t think so when I first started the degree. I was all Windows and anything I could do on the Unix terminals in the computer science lab there was the same thing I could do on Windows. I was misguided.

While it’s possible to perform the same actions on either platform, the Linux side promotes the sharing of knowledge. There is a global community of people (LinuxQuestions, UbuntuForums, etc) so help is always close at hand. Monthly meetings are held close by in the form of Linux Users Groups. And when something works, it most often just works (without that blue screen of death).

If you’re concerned about games, in the very least dual boot a WinXP/*nix PC. Wine is getting better (and in fact version 1 is coming soon). Wine is a virtual machine that allows programs compiled for Windows to run within Linux. Best of all, there is a growing market of commercial (and free) PC games for Linux as well (Frictional Games, iD Software, BioWare, Introversion, and the new Penny Arcade game…)

Linux is everywhere, right under your nose. It can be found on cell phones, mp3 players. I even have a version of uClinux running on my Nintendo DS. So isn’t it about time you give it a try? The only thing you should be afraid of is really enjoying the experience. It’ll suck away your free time because you won’t want to leave.

Switch to our mobile site