This guide is for rooting your Nexus S [works with NS4G, I9020T, I9023, and I9020A variants]. By the end of this guide, your device will have an unlocked bootloader, a custom recovery, root access and Superuser app, and the ability to flash ROMs and kernels.
[Disclaimer! Your warranty is now void. I am not responsible for bricked or damaged devices! You are choosing to follow this guide]
Step 0: Download and extract the file found here http://devhost.xda-developers.com/gcZ to your C:/ drive (for simplicity’s sake).
Plug in your phone and put it into USB Debugging Mode, found by going to Settings>Applications>Development (in Gingerbread) or Settings >Developer Options (in Ice Cream Sandwich).
Extract and install the drivers included if you don’t already have them installed.
Step 1: Turn your phone off.
Then, press both the volume up and power button.
You should now be in the Android Bootloader Interface (with a green Android and the options for Reboot, Recovery, Reboot Recovery, and Power off)
Step 2: Now, we have to open a command prompt and change the directory to the location where we have extracted the files (which, if you followed step 0, should be in the C:/ drive).
Open a command prompt and type “cd C:\Nexus S One Click Root.”
We should now be in the correct directory for using fastboot commands.
Step 3: Type the command “fastboot oem unlock” and press enter.
A screen should pop up on your Nexus S.
Use the volume buttons to scroll and the power button to select “Yes” (as the screen says, picking yes WILL wipe everything on your device).
Step 4: Type the command “fastboot flash recovery cwm.img”.
Then type “fastboot boot cwm.img”.
Step 5: Now we have to mount USB storage to copy over the Su.zip file and install it.
Tap or use the volume keys to scroll and select “Mounts and Storage” > “Mount USB Storage” [you have to scroll down to get to it].
Copy the su.zip file to your Nexus S.
Press “Go Back” twice to return to the main menu.
Step 6: Press “install zip from SD card” [you can also use the volume buttons to scroll and the power/lock button to select].
Press “choose zip from SD”.
Press the “su.zip” file you placed on the SD card earlier.
Congratulations! Your phone is now rooted! Select “Reboot System Now” and enjoy!