emerge Command: Tutorial & Examples
Install, remove, and manage software packages on Gentoo-based systems
emerge is the command-line tool for package management in Gentoo Linux and its derivatives. It is used to install, remove, and update packages on the system.
emerge uses the Portage package management system which is designed to be highly flexible and customizable, allowing users to easily manage and customize their system.
emerge can be used to perform a variety of package management tasks, such as:
- Installing a new package:
- Updating a package:
emerge --update package_name
- Removing a package:
emerge --unmerge package_name
- Searching for a package:
emerge --search package_name
- Listing all installed packages:
- Listing all available updates:
emerge uses a tree-based approach to package management, which means that it retrieves package information and software from remote repositories. These repositories are configured in the
/etc/portage/repos.conf directory and can be added, removed, and enabled/disabled as needed.
emerge also has a command-line option
--oneshot that installs a package only temporarily, it will not be tracked as an installed package and will not be updated or uninstalled by Portage, it's useful when you need to use a package only once.
emerge also allows users to customize their system by using different versions of packages, different USE flags, and different package management options.