How do I install Clear Linux's kernel?

So it is in the Arch Linux repo or the AUR (I don’t know honestly), how would I install it using yay? What would I type?

I’d guess it goes wrong.
As always,

backup first …

But that’s just my opinion. :smiley:

1 Like

I am going to put it int he grub menu. I don’t honestly know how to download it and install it, do you know what command I should exactly type to download and install?

yay -S linux-clear

Make sure you read the additional instructions on the AUR page. It looks like it requires manual boot entries to be created.


Sorry I am not too sure but after when I typed yay -S linux-clear, is it compiling right now?




Is there a way to edit the gcc flags before I type yay -S linux-clear?

Depending on what you want to do, many of the defaults are in /etc/makepkg.conf

For example, if you wanted to use more cores.

1 Like

How do you know about gcc flags when you ask originally:

So it is in the Arch Linux repo or the AUR (I don’t know honestly), how would I install it using yay ? What would I type?

I was informed to use some specific flags to compile the Clear Linux kernel as using the default gcc flags on Arch does not optimise the code as much.

So it is in the AUR

OK so you have to type yay -S linux-clear. But I don’t know how do I get gcc to compile using different flags if I am installing it via yay.

I moved the thread to Lounge, since it hasn’t got to do with an issue on the general system.


If you want to edit specific gcc flags for this package alone you can do it with:

yay -S linux-clear --editmenu

This will bring up a menu for each AUR package asking if you want to edit the PKGBUILD. Edit the PKGBUILD for linux-clear and set the flags there. This is going to require you to read and understand the PKGBUILD so you can determine where the appropriate flags belong.

That being said, I would not recommend trying to add additional flags and optimize further until you build the base package, install it and get it working.

There is no guarantee that those flags will be compatible with your system and/or EOS in general.

Lastly, be aware you are trying to do fairly complicated things and it doesn’t seem like you have enough “base” knowledge to tackle them yet. That is OK, but you are likely going to hit some difficult things you have to struggle through on your own because there probably aren’t a lot of people here who run the clear kernel and even fewer who have experience customizing it.


Thanks for that, I was recommended by the clear linux people to use their flags as using the default arch linux flags did not optimise the kernel that much.

Thanks anyways I will keep that in mind :slight_smile:

If i was going to run the clear linux kernel i would just run Clear Linux.


THe problem is is that it does not use the pacman package manager, it uses flatpak instead. It is confusing to use and it bloats your system in terms of space a lot. Arch is so simple to use compared to Debian and any other kinds of distros.

One questino, out of curiosity, is it possible for somebody to package a program/kernel and force yay to use a different set of flags for gcc by any chance?

That is essentially what I gave you the instructions on how to do above.

Maybe we should start with what an AUR package is. An AUR package is a set files which minimally includes a PKGBUILD but can also contain other files such as patches, services or scripts. The PKGBUILD describes how to build the package including downloading, compiling and installing as needed. If you want to use different gcc flags, you simply change the compilation instructions in the PKGBUILD.

If you want to create a new AUR package with that done in advance, you would do the following:

  • Make the changes described above
  • Test them on a pure Arch system in a clean chroot
  • Upload the new files to AUR with a new package name
  • Hope the package doesn’t get removed from AUR because it is basically the same package as linux-clear with different gcc flags.
  • You would then have to maintain it which would mean testing and modifying the build as new kernels were released.

It is worth noting that a repo package starts out as more less the exact same thing. The difference with a repo package is that someone has already downloaded, compiled and compressed it for you. It is also signed by the packager.

I would, once again, make a strong recommendation to first install the linux-clear kernel as it is before trying to optimize it further. The reason for this is if you modify it first and it doesn’t work you will not know if the issue is with your installation process or your modifications. Since the kernel requires special handling to get working, I would get it working without modifications and then rebuild it with the modifications you want after that.


Thanks for the info, it is very informative. I will install it without modifications and then with modifications if it works. I just have this last question. When I type yay -S linux-clear --editmenu, how do I edit text? And do I look for the PKGBUILD field?

It should give you a menu asking you if you want to edit the PKGBUILD.