Table of Content


I will add more information related to Gentoo Linux from time to time.

Since my employer uses Ubuntu as the operating system, I only have a Gentoo Linux running on my private server.

Usefull Tools

eix – A Set Of Utilities For Searching

If you want to know if a package (program) is available you should use eix (wiki)!

Installation

emerge -av app-portage/eix

Keep eix Up-To-Date

eix-sync

Searching With eix

To search for a package containing foo keyword:

eix foo

To search for an installed package containing foo keyword:

eix -I foo

Update Your Gentoo System

The following lines will update your Gentoo System. The first step is to create binary packages (with config files) before performing update steps to keep a backup of the current installed package version.

# update your package database
eix -uc
# create binary package for each package which will be updated later
quickpkg --include-config=y $(eix -uc --only-names) 
# update all packages
emerge @world -uvaDN --autounmask-write --with-bdeps=y
# rebuild packages if need
emerge -va @preserved-rebuild @module-rebuild 
revdep-rebuild -v -- --ask

Maybe you want to remove unused binary packages from time to time. I prefer eclean because I have app-portage/gentoolkit installed already.

Cleanup with eclean

eclean is part of app-portage/gentoolkit

eclean packages

Cleanup with qpkg

qpkg is part of app-portage/portage-utils

qpkg -c

Chroot Into Your Gentoo System

Mount all devices and folder (Gentoo is located under /repair/:

mount --rbind /dev /repair/dev
mount --make-rslave /repair/dev
mount -t proc /proc /repair/proc
mount --rbind /sys /repair/sys
mount --make-rslave /repair/sys
mount --rbind /tmp /repair/tmp

chroot into Gentoo:

chroot /repair /bin/bash
env-update
source /etc/profile
export PS1="(chroot) $PS1"

Cleanup Gentoo System

cleanup source directory (distfiles)

# -p -- only display what would be cleaned, remove -p after checking
eclean -p distfiles

cleanup binary files from system

# -p -- only display what would be cleaned, remove -p after checking
eclean -p packages