You can find the Windows jailbreak here and The Linux Jailbreak here.
Please read on for a tutorial on how to use Greenpois0n:
These are instructions on how to jailbreak your iPhone 3GS and iPhone 4 using Greenpois0n for Windows. Greenpois0n only supports iOS 4.1 firmware. Use Limera1n if you want to jailbreak iOS 4.0, iOS 4.0.1, iOS 4.0.2.
Remember: Do not update to iOS 4.1 if you need the unlock. Ultrasn0w does not support that baseband yet. The only exception is the iPhone 4. You can update to iOS 4.1 without upgrading your baseband by following this tutorial.
Open your web browser of choice and navigate to http://www.greenpois0n.com. Click the Windows link at the bottom of the screen, or just use the link at the top of this post.
When prompted save the download to your desktop
Double click the downloaded gp_win_rc2.zip file then drag the greenpois0n.exe file to the desktop. Double greenpois0n.exe from the desktop to launch the application
Power off your iPhone then click the large Prepare to Jailbreak (DFU) button
You will now be instructed on how to place your iPhone into DFU mode. You can get help with this here.
You will be asked to press and hold the sleep button for 2 seconds.
Continue holding sleep; press and hold home for 10 seconds.
Release sleep button; continue holding home for 15 seconds.
Once your iPhone is successfully in DFU mode you may click the Jailbreak button.
Greenpois0n will now jailbreak your device
Click the Quit button once the software application has completed.
You'll notice some verbose mode text scrolling on your device.
After the iPhone restarts you'll notice a new Loader application on your Springboard. Press to launch it.
Press to select Cydia then press the large Install Cydia button that appears.
Once Cydia has installed successfully you will be asked if you want to remove Loader from your device. Press the Remove button then press the Home button. Your device will now automatically reboot.
When your iPhone has restarted you can run Cydia. Let it do all the necessary updates then follow our Unlock tutorial if possible for your device.
Please visit The Chronic Dev Team and The iPhone Dev Team's blogs for more info and to express your thanks for this Jailbreak.