Useful commmands in Gentoo

Safe way to upgrade:

emerge --sync &  eix-sync
emerge -avuDN --with-bdeps y --keep-going world
etc-update & dispatch-conf
emerge -av --depclean
revdep-rebuild
eclean -d distfiles

Remove a list of files:

cat cruft.log | xargs rm -rf

Check dependency:

$ equery depends netifrc
 * These packages depend on netifrc:
$ equery depends openrc
 * These packages depend on openrc:
virtual/service-manager-0 (!prefix ? sys-apps/openrc) 

Kernel related:

genkernel --oldconfig --menuconfig --makeopts=-j3 --install all
genkernel --menuconfig --kernel-config=/usr/src/config-half --makeopts=-j3 --install all
emerge --ask @module-rebuild --verbose

Check battery:

cat /sys/class/power_supply/BAT0/uevent | grep POWER_SUPPLY_CAPACITY=

Excute a cmomand in a file( the above command in the ~/Note file ):

grep class ~/Note | sh

 

你可能感兴趣的:(Useful commmands in Gentoo)