I want to setup linux kernel 3.18.1 on my machine. How do I obtain the same?
What I have already tried:
The current Linux source code is always available in both a complete tarball (an archive created with the tar command) and an incremental patch from the official home of the Linux kernel, http://www.kernel.org.
Commands to find your Linux Kernel Versionuname -r : Find Linux kernel version. cat /proc/version : Show Linux kernel version with help of a special file. hostnamectl | grep Kernel : For systemd based Linux distro you can use hotnamectl to display hostname and running Linux kernel version.
Using the uname Command The uname command displays several system information including, the Linux kernel architecture, name version, and release. The output above shows that the Linux kernel is 64-bit and its version is 4.15.
kernel.org has a public (read-only) git repository that you can clone. It has also tags for every kernel version, so you can checkout a specific version:
# Clone the kernel to your local machine $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git $ cd linux-stable # Find the tag for the version you want $ git tag -l | grep 3.18.1 v3.18.1 # Create a new branch with that tag $ git checkout -b my3.18.1 v3.18.1
Now the linux-stable
directory will have the kernel version you wanted.
(I know you said v3.18.1 doesn't exist as a tag, but it does)
Edit: The asker says he was using Torvalds' github repo, which is why he could not find the tag for 3.18.1. This is expected, because Torvalds' github repo only contains tags for release candidates.
The asker is asking for a minor revision (the .1 in 3.18.1), so he needs to get that from https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With