Gentoo Linux - Server System Administrator's FAQs ================================================= Last Updated: 2008-05-22 11:21:05 How Do I Search For A Package? ------------------------------ emerge -s How Do I Search For A Package Quicker? -------------------------------------- # install the package 'eix' and run the command 'update-eix' eix How Do I Install A Package? --------------------------- emerge -av How Do I Backup A Package? -------------------------- quickpkg How Do I Uninstall A Package? ----------------------------- emerge --unmerge How Do I Unmask A Package? -------------------------- # that depends on what type of masking it is # for hard masking [M] then add an entry to package.unmask echo "category/package-name" >> /etc/portage/package.unmask # for soft masking [~] then add an entry to package.keywords echo "category/package-name ~amd64" >> /etc/portage/package.keywords How Do I Make Something Start On Boot? -------------------------------------- ll /etc/init.d/ rc-update add default How Do I Stop Something Starting On Boot? ----------------------------------------- ll /etc/init.d/ rc-update del default How Do I Check Something Has Started On Boot? --------------------------------------------- rc-status --all How Do I Test Something Before I Make It Start On Boot? ------------------------------------------------------- /etc/init.d/ start How Do I Install A Particular Version Of A Package? --------------------------------------------------- # find out which versions are available eix # install the particular version emerge -av =category/package-name-version-number How Do I Make Sure A System Update Does Not Break My Package Version? --------------------------------------------------------------------- # Add entries to the system package mask configuration file echo ">=category/package-name-version-number" >> /etc/portage/package.mask How Do I List The Files A Package Contains? ------------------------------------------- # make sure you have the 'gentoolkit' package installed. equery files |sort |less # or the 'portage-utils' package (which is even cooler :-) qlist How Do I Find Out What File Came From Which Package? ---------------------------------------------------- # use 'portage-utils' (newer and better) qfile # or use 'gentoolkit' equery belongs How Do I Find Out When I Last Updated The Package Database? ---------------------------------------------------------- # use 'portage-utils' qlop --sync How Long Did It Take To Compile / Install A Package? ---------------------------------------------------- # use 'portage-utils' qlop --time What's This Portage Utils Package You Keep On About? ---------------------------------------------------- # portage is central to gentoo and if you need to ask a question # then use the 'portage-utils' package! Usage: q : invoke a portage utility applet Currently defined applets: q : virtual applet qatom : split atom strings qcache : search the metadata cache qcheck : verify integrity of installed packages qdepends : show dependency info qfile : list all pkgs owning files qglsa : check GLSAs against system qgrep : grep in ebuilds qlist : list files owned by pkgname qlop : emerge log analyzer qmerge : fetch and merge binary package qpkg : manipulate Gentoo binpkgs qsearch : search pkgname/desc qsize : calculate size usage qtbz2 : manipulate tbz2 packages quse : find pkgs using useflags qxpak : manipulate xpak archives How Do I Update The System? --------------------------- # 1. get the latest package list emerge --sync # 2. test the update for problems emerge --pretend --verbose --update --deep --newuse world # 3. if a package causes a BLOCK, back it up first then uninstall it # 4. If it all looks OK, then go for it! emerge --quiet --update --deep --newuse world # 5. Now update the system configuration files # a. First, deal with the trivial changes etc-update (then -1 to quit even with some remaining) # b. Now deal with the rest dispatch-conf # 6. Reboot reboot # 7. On boot up, check all loads and starts ok, then # check reverse dependencies revdep-rebuild How Do I Check For Security Advisories? --------------------------------------- glsa-check How Do I Compile A Kernel? -------------------------- cd /usr/src/linux/ # if you are upgrading the kernel, then run 'make oldconfig' first and answer questions to new features make oldconfig # if you are building the same kernel, or after a new kernel upgrade, now run the normal commands make && make modules_install cp -a arch//boot/bzImage /boot/kernel--gentoo- cp -a System.map /boot/System.map--gentoo- cp -a .config /boot/config--gentoo- # if you are upgrading the kernel then add new lines to /boot/grub/grub.conf e.g. title=Gentoo Linux 2.6.24 root (hd0,0) kernel /kernel-2.6.24-gentoo root=/dev/hda3 Where can I get unofficial ebuilds? ----------------------------------- bugs.gentoo.org Documentation / Help -------------------- www.gentoo.org forums.gentoo.org bugs.gentoo.org gentoo-wiki.com