The Linux kernel has always been freely available to anyone who wants it. If you just want to recompile the existing kernel, install the
linux-source package from the Ubuntu repositories. To get the very latest vanilla version, which is the commonly used term for the kernel version direct from the main kernel developers and which has not yet been patched or changed by any distribution-specific kernel team, open an FTP connection to ftp.kernel.org using your favorite FTP client and log in as anonymous. The latest stable kernel as of this writing is 3.4.6, so we use it in the following examples. Because you are interested in the 3.4 kernel, change directories to
The ftp.kernel.org site ...