Wednesday, March 16, 2016

Gentoo Commands

Below is a list of commands that I found I was often using during setup of the Gentoo Linux distro with brief descriptions of what they do. I will not always explain all the flags nor will the commands be in their most generic form. However, I will link to the full help files where appropriate. This list is largely for me, but I thought that the community might also find it helpful.

The backslash is used to indicate a multiline command as per Linux syntax.

Basic but useful for editing text without linewraps:
nano -w <file>

Obvious ping syntax for 3 calls.
ping -c 3 <website>

Checking out networks and taking them up/down
ifconfig <wifi name> [up/down]

Remove a package (lots of other emerge hints here).
emerge -aC <package>

Check status of package: R is it exists. U is update. N means new.
emerge -p <package>

Update system with new USE flags:
emerge --update --deep --newuse @world

Remove obsolete dependencies (good to check with -p flag first):
emerge --depclean

Reverse check dependencies:

This is also good (and more powerful) for package status as described here.
equery --quiet l <package>

List of USE flags for package.
equery uses <package>

Start up wpa_supplicant in the background based on .conf file
wpa_supplicant -B -i<wifi name> \

Basic .conf file should read:

But make sure that dhcpcd is up:

Alternative wifi setup with dhclient and NetworkManager (nmcli website):
systemctl start NetworkManager
nmcli dev wifi connect <ssid> password <password>

A set of <type> actions (first is enable at boot):
systemctl enable <service>
systemctl stop <service>
systemctl start <service>
systemctl restart <service>
systemctl reload <service>
systemctl status <service>
systemctl disable <service>
systemctl is-active <service>
systemctl list-units --type service --all

Where the main types I'm interested in are devices, mounts, paths, and services. The rest are listed here.

Quick kernel update of the available sources.
genkernel --no-clean --menuconfig all

Useful folders and files:


Name of computer.

Grub file for boot parameters

No comments:

Post a Comment

A place in which to share your thoughts...