Getting Started
How is Gentoo pronounced, and what does it mean?
A Gentoo is a species of a small, fast penguin, pronounced "gen-too" (the
"g" in "gentoo" is a soft "g", as in "gentle"). The scientific name of the Gentoo
penguin is Pygoscelis papua. The name Gentoo has been given to the
penguin by the inhabitants of the Falkland Islands (Islas Malvinas).
What makes Gentoo different?
Gentoo uses a BSD ports-like system called Portage. Portage is a package management system
that allows great flexibility while installing and maintaining software on a
Gentoo system. It provides compile-time option support (through USE flags),
conditional dependencies, "fake" installs, safe installation (through
sandboxing) and uninstallation of software, system profiles, configuration
file protection amongst several other features.
With Gentoo you can build your entire system from source completely using your
choice of optimizations. You have complete control over what packages are or
aren't installed. Gentoo provides you with numerous choices so you can install
Gentoo to your own taste. This is why Gentoo is called a
meta-distribution.
Gentoo is very actively developed. Not only the ebuilds themselves (the
package format Gentoo uses) but the entire distribution uses a rapid pace
development style. Patches to the packages are quickly integrated in the
mainline tree, documentation is updated on daily basis, portage features are
added frequently, releases succeed each other quickly, ...
Installation
I'm finding things to be really unstable and I'm using "-O9 -ffast-math
-fomit-frame-pointer" optimizations. What gives?
Don't bother using anything higher than -O3 since it isn't supported by
current versions of gcc. Very aggressive optimizations sometimes cause the
compiler to streamline the assembly code to the point where it doesn't quite
do the same thing anymore.
Please try to compile with CFLAGS -march= -O2 first before reporting a
bug.
How can i change the root (or any other user's) password?
You can use passwd to change the password for the user you are logged
into. For extra options and setting, please see man passwd once you've
completed the install.
How do i add a normal user?
The command adduser gentoo will add a user called gentoo. The next step
is to give this user a password and passwd will do exactly that.
Instead of adduser you can also use:
# useradd gentoo -m -G users,audio,wheel -s /bin/bash
This will add a user gentoo, will make possible for him to use sound-related
devices (/dev/sound/*), will make possible for him to switch to
root (using su) and will make /bin/bash his/her login shell.
You can also install superadduser using emerge superadduser and
then issue superadduser gentoo to add a user called gentoo. Just follow
the instructions given to you by superadduser.
Why can't a user su to root?
For security reasons, users may only su to root if they belong to the
wheel group. To add a username to the wheel group, issue
the following command as root:
# gpasswd -a username wheel
How do I disable devfs?
If you plan on using Gentoo with the "old-style" /dev approach, you
can disable devfs by passing the gentoo=nodevfs to the kernel. If on the
other hand you want to use udev (2.6
kernels only), you can disable devfs by passing the devfs=nomount option
to the kernel. Don't forget to read up on our udev guide too.
Can I upgrade Gentoo from one release to another without reinstalling?
In fact there is no difference between the various releases
after they have been installed. Gentoo 1.4 and later are
glibc-2.3.x based. As such running emerge --sync; emerge -u world
will bring your entire system up to speed with the "latest Gentoo".
The true differences between individual releases lie in the installation.
More information can be found in our Gentoo
Upgrading Guide.
My kernel doesn't boot (properly), what should I do now?
You don't need to redo every step of the installation, but only the
kernel-stuff and all associated steps. Suppose you have installed Gentoo
on /dev/hda1 (/boot) and /dev/hda3 (/) with
/dev/hda2 being the swap space:
Boot from the LiveCD and wait until you receive a prompt
We first mount all partitions:
# mount /dev/hda3 /mnt/gentoo
# mount /dev/hda1 /mnt/gentoo/boot
# swapon /dev/hda2
# mount -t proc none /mnt/gentoo/proc
Then we chroot into our Gentoo environment and configure the kernel:
# chroot /mnt/gentoo /bin/bash
# env-update && source /etc/profile
# cd /usr/src/linux
# make menuconfig
Now (de)select anything you have (de)selected wrongly at your
previous attempt. Then quit and compile your kernel:
# make dep && make bzImage modules modules_install
Now copy over your bzImage file, overwriting your previous one:
# cp arch/i386/boot/bzImage /boot
If you use LILO, rerun lilo -- GRUB users should skip this:
# /sbin/lilo
Now exit the chroot and reboot.
# exit
# umount /mnt/gentoo/proc /mnt/gentoo/boot /mnt/gentoo
# reboot
If on the other hand the problem lays with your bootloader configuration,
follow the same steps, but instead of configuring/compiling your kernel you
should reconfigure your bootloader (recompilation isn't necessary).
My proxy requires authentication, what do I have to do?
When you have to download something using wget, use the
following syntax to authenticate yourself:
# wget --proxy-user=username --proxy-passwd=password <url>
To have Portage automatically use this scheme, define it in
/etc/make.conf:
FETCHCOMMAND="wget --proxy-user=username --proxy-passwd=password \
-t 5 --passive-ftp -P \${DISTDIR} \${URI}"
RESUMECOMMAND="/usr/bin/wget --proxy-user=username --proxy-passwd=password \
-c -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
To have rsync use a proxy, set the RSYNC_PROXY environment variable as
so:
RSYNC_PROXY="username:password@proxy-server:port"
How do I burn an ISO file?
You need to burn the file in so-called raw mode. This means that you
should not just place the file on the CD, but interpret the file as an
entire CD.
There are lots of CD burning tools available; covering them all would be a
Sisyphean problem. Describing a few popular tools however doesn't hurt :)
-
With EasyCD Creator you select File, Record CD
from CD image. Then you change the Files of type to ISO image
file. Then locate the ISO file and click Open. When you click on
Start recording the ISO image will be burned correctly onto the CD-R.
-
With Nero Burning ROM, cancel the wizard which automatically pops up and
select Burn Image from the File menu. Select the image you
want to burn and click Open. Now hit the Burn button and watch
your brand new CD being burnt.
-
With cdrecord, you simply type cdrecord dev=/dev/hdc (replace
/dev/hdc with your CD-RW drive's device path) followed
by the path to the ISO file :)
-
With K3B, select Tools > CD > Burn Image. Then
you can locate your ISO file within the 'Image to Burn' area. Finally click
Start.
-
With Mac OS X Panther, launch Disk Utility from
Applications/Utilities, select Open from the
Images menu, select the mounted disk image in the main window and
select Burn in the Images menu.
-
With Mac OS X Jaguar, launch Disk Copy from
Applications/Utilities, select Burn Image from the
File menu, select the ISO and click the Burn button.
What CD/stage should I use for my CPU?
First you need to find our what CPU you use. Suppose it's a Pentium-M. Then you
need to find out what CPU it is, instruction-wise, compatible with. You need to
consult the CPUs vendor website for this, although Google is at least as efficient :-).
For the Pentium-M, you'll find out that it is a Pentium-3 with SSE instructions,
meaning it is instruction-compatible with the Pentium-4. So, for Pentium-M
systems, you can choose the Pentium-4 CD/stage files.
If you are uncertain, take a "lower" CD/stage file, for instance a i686 or even
generic.
Package Management
In what format are the packages stored?
They exist in our portage tree as ebuild autobuild scripts; Gentoo is
primarily a ports-based distribution, meaning that we provide scripts
(.ebuild files) and a special system (Portage) so that you can build
apps from sources. We generally only build binaries for releases and snapshots.
The Gentoo
Ebuild HOWTO covers the
contents of an ebuild script in detail. For full binary ISO releases, we
create a full suite of binary packages in an enhanced .tbz2 format
(.tar.bz2 compatible with meta-information attached to the end of the
file).
What if rsync doesn't work for me?
If you're behind a firewall that doesn't permit rsync traffic, then you can use
emerge-webrsync which will fetch and install a Portage snapshot for you
through regular HTTP. emerge-webrsync uses wget to download, so
proxy is fully supported.
# emerge-webrsync
How do I use emerge from behind a firewall?
Edit the PROXY settings in /etc/make.conf. If that doesn't work,
edit /etc/wget/wgetrc and edit http_proxy and ftp_proxy
appropriately.
Can I rsync from another operating system?
There's a program called unison that works under both UNIX and Win32, available
from http://www.cis.upenn.edu/~bcpierce/unison/.
I have only slow modem connection at home. Can I download sources somewhere
else and add them to my system?
Definitely. You can run emerge --pretend package to see what programs
are going to be installed. To find out the sources for those packages and where
to download the sources from, you can run emerge -fp package. Download
sources and bring them on any media home. Put the sources into
/usr/portage/distfiles and run emerge package to see it
picking up the sources you just brought in!
.tar.gz sources for installed software are piling up in
/usr/portage/distfiles/ using valuable space. Is it safe to delete these
files?
Yes, you can safely delete these files. But if you are on a slow
connection, such as a modem, you might want to keep the archives if
possible; often several ebuilds will be released for the same version of
a specific piece of software - if you have deleted the archive and you
upgrade the software it will have to be downloaded from the internet
again.
What's in /var/tmp/portage? Is it safe to delete the files and
directories in /var/tmp/portage?
During compilation, Gentoo saves the sources of the package in
/var/tmp/portage. It is safe to clean out all contents of this
directory.
Usage
I have installed openssh on my box, but can only log in as root - my normal
user account doesn't work.
This is most probably because your user account doesn't have a valid shell
specified. Check for your user entry in /etc/passwd and see if it
ends in /bin/bash (or any other shell). If it doesn't, you must set a shell for
the user. This is done using the usermod command, like this:
# usermod -s /bin/bash myuser
I can start X applications as root only.
Your /tmp directory has the wrong permissions (it needs the
sticky bit set). Type the following as root:
# chmod 1777 /tmp
How do I set up an International Keyboard Layout?
Edit the KEYMAP variable in /etc/rc.conf.
Then either reboot or restart the keymaps script:
/etc/init.d/keymaps restart.
DNS name resolution works for root only.
/etc/resolv.conf has the wrong permissions; chmod it as
follows:
# chmod 0644 /etc/resolv.conf
Why can't my user use their own crontab?
You need to add that user to the cron group.
How do I get numlock to start on boot?
If you log on graphically, or want numlock to be activated when
you issue startx, then you must emerge numlockx and
add /usr/X11R6/bin/numlockx to
/etc/X11/xinit/xinitrc (for startx) or
/etc/X11/Sessions/ (for any graphical login manager) such
as /etc/X11/Sessions/Gnome for GDM.
GNOME 2.6 users however will notice that this doesn't work. Instead, they will
need to start the gnome-session-properties tool. At the top of the
Window, select Startup Programs and click the Add button. Now
insert the location of the numlockx tool (for instance
/usr/X11R6/bin/numlockx) and exit.
If you work in commandline, you only need to rc-update add
numlock default and numlock will be activated on the next
reboot.
How do I have my terminal cleared when I log out?
To have your terminal cleared, add clear to your
~/.bash_logout script:
$ echo clear >> ~/.bash_logout
If you want this to happen automatically when you add a new
user, do the same for the /etc/skel/.bash_logout:
# echo clear >> /etc/skel/.bash_logout
I'm not able to run X applications as root after su'ing
This issue seems only to occur when you log on graphically. startx users
don't have this behaviour. The problem is a bug in Gentoo's PAM,
the solution however is quite simple: add the following line to
/etc/profile.
export XAUTHORITY="${HOME}/.Xauthority"
Development
Where can I report bugs?
For bugs within a specific program, contact the program's author. Otherwise,
use our Bugzilla bug tracker at http://bugs.gentoo.org. You can
also visit us in #gentoo on the FreeNode IRC network.
How often are new releases made?
New releases are announced on the gentoo-announce
mailing list. In reality the packages themselves are updated shortly after the
main authors release new code. As for when Gentoo makes new releases, check our
Release Engineering Project page.
How can I add a question or answer to this FAQ?
Submit a new bug over at http://bugs.gentoo.org and add it to the
"Docs-user" product, "Gentoo Linux FAQ" component.
My speaker beeps like crazy while compiling Mozilla. How do I disable console
beeps?
Console beeps can be turned off using setterm, like this:
# setterm -blength 0
If you would like to turn off the console beeps on boot
you need to put this command in /etc/conf.d/local.start. However,
this only disables beeps for the current terminal. To disable
beeps for other terminals, pipe the command output to the
target terminal, like this:
# setterm -blength 0 >/dev/vc/1
You need to replace /dev/vc/1 with the terminal you would like to disable
console beeps for.
Resources
Where can I find more information about Gentoo Linux?
The official Gentoo documentation can be found on
http://www.gentoo.org; general Linux information is at
http://www.tldp.org.
Can I buy a CD of Gentoo Linux?
Yes! LiveCDs for all supported architecture are available on
our Gentoo Store. When you
purchase a CD from our store, you are also supporting our development.
So, please consider buying from our store if possible :-)
You can also find fresh CDs from
tuxcds for a very good price. These people also bounce back a
portion of the profits to the Gentoo project, so buy them while they are hot!
Why, when I hit reply to a post on a Gentoo mailing list, does my answer
only go to the original poster and not the entire list?
The mailing list administrators have decided to go with minimal munging
(altering of mail headers), which means that they have decided against
altering headers to have replies go to the mailing list. There are various
reasons for this. For example, if a subscriber has a full mailbox, the
entire list receives notice of this every time that something is posted.
Most GUI based mailers have a "reply to all" function. This will ensure that
your reply goes to the mailing list as well as the original poster. Most
users of text based emailers already know the methods to use, but if you
don't, in Pine, there is a "reply to group" option. Setting Mutt to reply to
the list is covered in the unofficial documentation at
forums.gentoo.org.
Some list members do not like this method, but it was very heavily
discussed when it went into effect, with arguments on both sides.
Eventually the list administrators decided to keep it this way. Discussing
it on the mailing list will sometimes bring a polite explanation and other
times a rather brusque comment to check the archives. Although the
administrators regret the inconvenience that it may cause some users, it is
felt that at present it is preferable to the alternative for several
reasons, many of these covered
here.
(There are other eloquent arguments in favor of munging, and yes, the list
administrators have seen them).
This FAQ hasn't answered my question. What do I do now?
A good first step is to browse through the relevant documentation, failing that,
the various Gentoo Linux mailing lists listed on Google. To search through the Gentoo
mailing lists, just enter "lists.gentoo.org foo" to search for "foo". If all
else fails, or you just want to hang out with Gentoo folks, visit us on irc:
#gentoo on irc.freenode.net.