10 Fundamental Tips for Your Gentoo Linux
First part of this series.
So I’m going to post a series of tips from both here on a list of topics like this, although there is no such information in the title of this post, this is the FIRST PART of this series. I believe that to start these initial tips are essential, let’s go to the list!
1. Enable IKCONFIG in Kernel
.config in the Kernel, also known as IKCONFIG, allows users to build a copy of the configuration with which the kernel was built inside the kernel itself.
This allows them to inspect the kernel configuration while it is running, without having to worry about whether they changed or cleared the source directory after compilation.
Enabling in the kernel:
General Setup ---> <*/M> Kernel .config support [*] Enable access to .config through /proc/config.gz
If you have GRUB, also run:
grub-mkconfig -o /boot/grub/grub.cfg
2. Define a ACCEPT_KEYWORDS in your
If your system is amd64, for example, some software requires you to explain this, because the package has code for other architectures, and you will not be able to install it if this variable is not defined, learn more here. Example:
ACCEPT_KEYWORDS="~amd64", or just run:
3. Know when to use an Overlay
4. Enable commonly used parameters by default
If you use any
emerge parameters frequently, it is interesting to add them to the EMERGE_DEFAULT_OPTS variable in your
/etc/portage/make.conf. For example, I use
-a a lot and my processor only has 2 cores, so I always compile with
--jobs 2 so as not to overload my notebook.
--verboseoption is also very interesting!
5. Gain more performance in the builds
Make frequent use of the
--quiet option or just
-q, the compiler outputs not only make the prompt look ugly, they make the compilation take longer, really! I did the test with small and large software and the times approached the gain of 15% on average.
I just don’t recommend using this parameter in the previous tip variable, as the outputs of
--search will be suppressed and with less details, learn more.
6. Know how to use FLAGS correctly
/etc/portage/package.use/zz-autounmask file. Do not set flags directly using the variable USE in the terminal, eg
, this creates a problem when you update the software, it will recompile without network and mpd support, without saying that in most cases it is not interesting to add flags universally to the USE variable in
sudo USE="network mpd" emerge polybar
/etc/portage/make.conf, only when they are global cases, that is, when any software depends on it, for example:
USE="gnome -kde"(if your system has GNOME installed and does not has KDE), but this example was very reasonable, because your ** profile ** (see
eselect profile list) that you defined when installing your Gentoo and chose (
set) for GNOME, therefore all flags for this are already defined for Portage, see with
emerge info | grep ^ USE.
So the most correct way is to insert the flag only for the software you want in the
/etc/portage/package.use/zz-autounmask file, remember to add with the software version, example:
echo '>=x11-misc/polybar-3.4.2-r1 network mpd' | sudo tee -a /etc/portage/package.use/zz-autounmask the
>= option at the beginning of the line says that Portage should include this ** flag ** for any version equal to or greater than the one informed and separated by spaces inform the flags.
7. Explore Gentoolkit
Before compiling/installing any package, use the command
equery uses [category/package-name] (always inform with the category to avoid ambiguous package names), you must have Gentoolkit installed (
emerge gentoolkit) eg:
equery uses x11-misc/polybar, and see which flags are already enabled for installation and/or also updating and which ones you would like to include in your
There are several options for the
equery command (which packages depend on a flag; which packages use a certain flag; …), run
equery --help for more details and test each one to better understand each option.
8. Pay attention to licenses!
Also use the variable ACCEPT_LICENSE=”*“ in your
make.conf, in which case it accepts all types of licenses and avoids problems during application installation.
9. Language packs
Also set the language of your system directly in your
make.conf using the L10N variable, example: L10N=”pt-BR” in this case if you install software with the language in Brazilian portuguese.
To find out which code/name to use for your country see here, if your system is English United States this information is not necessary and do not forget to update with the
--changed-use option, eg
emerge --update --changed-use @world. Do not use the LINGUAS variable it has been discontinued, see as well.
10. Get faster!
Make package downloads faster by defining a
mirror for it using the GENTOO_MIRRORS variable in your
make.conf, example for the UFPR Brazil mirror:
GENTOO_MIRRORS="https://gentoo.c3sl.ufpr.br/ http://gentoo.c3sl.ufpr.br/ rsync://gentoo.c3sl.ufpr.br/gentoo/", see the list of mirros here.
If you want more ease to insert, install/use the command mirrorselect.
I hope this first part of this series is useful, if you are interested in knowing how my
make.conf is doing, here it is:
- How to Create an ebuild on Gentoo
- How to install rofi on Gentoo and create shortcut for it on bspwm
- Installing Lightworks on Gentoo
- How to install bspwm on Gentoo
- How to Enable Webcam Drive and Install Cheese on Gentoo
- Installing and Configuring sudo on Gentoo
- Configuring Mirrors on Gentoo
- How to Install Programs via Layman on Gentoo
- How to Install Vivaldi Browser on Gentoo
- Gentoo - Can’t connect to local MySQL server through socket
- How to Troubleshoot Audio or Sound on Gentoo