cygwin…
November 1st, 2006So, if you’re a developer, and you ever use windows platforms, and you haven’t heard of
cygwin, you should have…
A friend of mine pointed it out to me some time back.. I never really got it at the time. I mean, it gave me a shell that sort of worked like Unix, but not really…Sometimes things just didn’t work since it’s not really Unix… just a shell that works like Unix.Â
What do you get with it? Turns out - a whole lot. Here are some of the key features that I like:
- OpenSSL already set up for you (more on that later if you don’t know why that’s important!)
- command line ssh client
- sshd
- command line sftp client - very handy!
- all the familiar unix tools - shell scripting, find, grep, sed, vi (why would you use vi? well, maybe because you can securely ssh into your box at home!
- a bash shell with a “unixified” windows environment…..you can use ls, ps, kill, etc…
- an X server - lovely if you have unix boxes on your network and want to display to your windows box
That’s just what I’ve found so far…I keep finding more and more very useful tools, and now I can’t live without it. I literally use it daily…Give me an example, you say?
Here has to be the wackiest yet utterly useful application of cygwin for me thus far. At work, my hands are somewhat tied. Got the usual firewall and restrictions, and strict prohibition of tunneling through the firewall. Since I like having a job, I don’t break the rules. But since I like being productive, I need my home systems to help me out every now and then to test around or experiment with something. So here’s how cygwin saves the day for me. I’ve set up an sshd server using the lovely and simple tutorial I found from googling for ‘cygwin ssh’. I have a Treo 700p (recently upgraded from a Treo 650p thanks to work :), and the Palm development community has a wonderful little app called TuSSH (yup, that’s what it’s really called - funny, eh?).  It’s an ssh client for my phone…I can actually use it to open a bash shell on my computer at home! (screenshot below is from the official TuSSH site)
Surprisingly, TuSSH very easy to work with… I can log into my home machine, securely, start and stop webservers and application servers, run commands, etc… Most recently, I was trying to use openssl to look for a sporadic problem with invalid digital certificates that appeared to be on one or more of a partner company’s myriad servers. I was able to log into my home computer, write some quick shell scripts to poll their servers a few thousand times and look for invalid digital certificates. I couldn’t run it from work b/c openssl doesn’t have proxy support (I think I saw that someone added it somewhere, but didn’t have time to try to get that working - just needed to test). BTW, I love showing this to other geeky people…being able to view pages on my home web server via my phone, then edit the content with my phone, then view the updates with the phone is just way too cool… (They do have a VNC client too, but that’s just a little too much… I can see the screen on my home computer, but it’s like looking at a giant mural with a microscope…it is cool, but utterly useless). Incidentally, I can also use it to log into my home network and fix minor problems that crop up here and there for my wife while I’m at work… :DÂ
But it’s really the day-to-day use that makes cygwin worth installing, and familiarizing yourself with…First time I tried it, I didn’t give it a fair shake, and stupidly, I trudged through the world without its benefits…Don’t make the same mistake… Install it, learn it, use it… and you’ll love it - at least as long as you’re stuck in the Windoze world….