Can someone please explain how to apply a patch file to ubuntu server kernel? I'm trying to apply this patch file which enables the tcp_collapse_max_bytes option in the TCP communication options on an ubuntu server. I followed this answer and tried to apply the .patch but got the same error.
Here are my steps: first, I changed the directory to the kernel source folder:
cd /usr/src/linux-headers-5.15.0-58-generic
Then I run the command patch -p0 ~/file.patch
But I got the following info and it keeps asking me to enter the file to patch
can't find file to patch at input line 44
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
...
...
File to patch:
I think I am working in wrong directory but I am not sure.