Artificial intelligent assistant

How can I change the OS version output? My `uname -r` (and as is my real problem, Java system property os.version) returns a version number that has dashes in it. It looks like: 5.9.12-gentoo-blah-blah. This breaks an app I'm using which doesn't like the dashes in the version number (it expects just a number, no dashes allowed). How can I change the version number of my operating system? I just want to return the kernel version and don't worry about the rest.

The OS release is returned from the kernel by the `uname` system call (`man 2 uname` for limited information about it). The information can also be found under `/proc/sys/kernel/osrelease`. That file is read-only and there's no way to change the OS release of a kernel after it has been built.

The OS release is set in the `Makefile` of the kernel. The first 4 lines are:


VERSION =
PATCHLEVEL =
SUBLEVEL =
EXTRAVERSION =


It's also possible that extra information is added during the build if you build from a version control repository.

The kernel from Gentoo adds an EXTRAVERSION which has dashes in it. Before building the kernel modify the `Makefile` to set the version to what you want.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy b2cbc6e1ac8c0af184ac3e734a4a49b3