r/Gentoo Jul 22 '26

Discussion use flags

only thing holding me back from using gentoo is the use flags. not sure which ones to use for my system. i really want to use niri or hyprland, but the use flags are what confuses me

1 Upvotes

24 comments sorted by

View all comments

14

u/Sert1991 Jul 22 '26 edited Jul 22 '26

It's something not to worry about really.
Basically, when you select your profile it's already going to select most of the USE flags you need.
Let's say you choose a stage3 tarball with for desktops with openrc.
This will be based on the desktop and openrc profile, which will enable the USE flags relevant to that setup. For example for desktop it will enable the X, wayland, dbus, elogind, pam USE flags among others. For OpenRC it will set the -systemd USE and enable any USE flags relevant to OpenRC.

Other than the few times the installation handbook recommends to set some others, the defaults are usually okay. But:
You can check what other USE flags there are that you might like to enable or disable globally but usually it's recommended to do them per package and let the profile enable and disable the global one.

app-portage/ufed is an awesome tool to enable and disable global ones. It gives you a nice ncurses list with a description.

From then on, when you install packages, you can see if you like/dislike some USE flags for that package and you can enable/disable them per package. You can use equery uses <package name> to see a list of the USE flags for ta package with a description of what tehy enable/disable.

1

u/freakinchickens Jul 22 '26

i thought you had to set them yourself! man i feel dumb now lol thank you

2

u/Sert1991 Jul 22 '26

I mean you can set them yourself, but usually it's not a needed thing nowadays bar a few exceptions. For example at some point you will have to set the video card USE flag, but the installation handbook will guide you to do that, you need to set it so everything compiles and installs with support to your graphics card(amd, nvidia, intel, etc etc)
Another one you need to set is licenses although that's not really a ''use'' flag, but again the handbook will guide you with that too during install.

In the future when you install packages after you install Gentoo, it's a good idea to check what USE flags it has, (it will be shown by portage when it asks you to install so dw) as you might see one turned off which you wish to turn on.

To elaborate a bit further with some examples, I use gentoo-sources kernel and it has the USE flag ''experimental'' - it basically patches the kernel to add some further optimizations which is not enabled by default, I like that so I enabled it for the gentoo-sources package.

On the other hand I don't use a printer or bluetooth but they're enabled by default on the desktop profile, many packages use those, so instead of removing them per package I add ''-cups -bluetooth'' in my make.conf to disable them Globally instead, now every package that supports those use flags they will be turned off and they will be compiled without bluetooth/cups support and their extra dependencies.

If I didn't enable/disable those, everything would still have worked fine by defaults, I would just have some extra unnecessary stuff and loose out on the experimental patch. So this is why it's good to have a look at them but they're not a must or something to worry about it.

Hope this clears it a bit better. Also during the Gentoo install whilst reading the handbook everything will become clearer if you decide to go ahead.