I am using Gentoo GNU/Linux on one of my home desktops and wanted to install all the self-emerged programs to /usr/local using portage (similar to FreeBSD port system), but was wondering:

  1. Is it officially supported?
  2. Does is it create any practical problem from a system admin point of view? (As I will be managing this system myself)

1 Answer 1


You can do this with the --prefix argument to emerge.

emerge --prefix=/usr/local somepackage

This is equivalent to setting the EPREFIX environment variable prior to calling emerge. If you start doing this you'll want to make sure /usr/local/bin is in your PATH.

Aside from that there shouldn't be any problems and from portages point of view there isn't a difference. You also won't have any differences in administration. Unmerging packages will still work the same.

There is one caveat to this -- dependencies brought in from the package you are emerging will also be installed into the new prefix. If you really only want the packages you specifically emerged to be in /usr/local, you'll need to keep this in mind.

If your goal is just to keep track of what packages you've specifically requested to be installed, portage records this in your world file /var/lib/portage/world.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .