To install locate on your gentoo : emerge sys-apps/mlocate
Then make updatedb
Showing posts with label gentoo command. Show all posts
Showing posts with label gentoo command. Show all posts
Monday, December 14, 2009
Saturday, November 14, 2009
chroot : Enter in a new environment
chroot is a unix command which permits to change root dir.
It permit to enter in a new environment in your terminal.So you can add an other system just in other window.For example, I launch my experimental gentoo in a terminal and I make a chroot. My terminal is similar to that : (chroot) localhost / #
The major advantage is I can compile and make update easily without having restart my computer.
Here is how you can do to enter in a new environment :
1) Mount experimental partition (depends on your system):
mount /dev/sda6 /mnt/gentoo
2) Mount /proc and /dev
Mount file system /proc in /mnt/gentoo/proc permit at the installation to use information provide by the kernel.Same things for /dev.
mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
3) Enter in a new environment :
You can do it in three steps.First you change the root directory by making a chroot.Then you create the environment variable whit env-update.And to finish, you load this variable in memory wy using source.
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
export PS1="(chroot) $PS1"
It permit to enter in a new environment in your terminal.So you can add an other system just in other window.For example, I launch my experimental gentoo in a terminal and I make a chroot. My terminal is similar to that : (chroot) localhost / #
The major advantage is I can compile and make update easily without having restart my computer.
Here is how you can do to enter in a new environment :
1) Mount experimental partition (depends on your system):
mount /dev/sda6 /mnt/gentoo
2) Mount /proc and /dev
Mount file system /proc in /mnt/gentoo/proc permit at the installation to use information provide by the kernel.Same things for /dev.
mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
3) Enter in a new environment :
You can do it in three steps.First you change the root directory by making a chroot.Then you create the environment variable whit env-update.And to finish, you load this variable in memory wy using source.
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
export PS1="(chroot) $PS1"
Friday, September 25, 2009
Search ebuild faster with eix
Problem :
You can search ebuild with emerge -s.Is there a faster way to search packet ?
Solution :
It exists a tool to make search faster on portage tree and other non official trees : eix
0) Install it :
1) Update it (you have to do this after emerge --sync) : update-eix
2) Search a packet (for example mediawiki) : eix -s mediawiki
You can search ebuild with emerge -s.Is there a faster way to search packet ?
Solution :
It exists a tool to make search faster on portage tree and other non official trees : eix
0) Install it :
$ echo app-portage/eix >> /etc/portage/package.keywords
$ emerge -av app-portage/eix
1) Update it (you have to do this after emerge --sync) : update-eix
2) Search a packet (for example mediawiki) : eix -s mediawiki
Saturday, September 19, 2009
equery
Definition : Equery is a package query tool.
Installation :
# emerge gentoolkit
USE :
Here is some common use about equery :
- List all installed package : equery l
$ equery l
ou
$ equery list
The output of the command is : [---] [--] package.
The first bracket can have these values :
I : installed package
P : Portage
O : Overlay
The second bracket can have these value :
~ : by keywords.
- : by arch
M : masqued
Example :
$ equery l
[ Searching for all packages in all categories among: ]
* installed packages
[I--] [ ] app-admin/eselect-1.1.3 (0)
[I--] [M ] app-admin/eselect-ctags-1.5 (0)
...
- List all dependency of a packet : equery depends [packet]
$ equery depends vim
[ Searching for packages depending on vim... ]
app-vim/gentoo-syntax-20070506 (>=app-editors/vim-7.0)
virtual/editor-0 (app-editors/vim)
- Search at which packet belongs this file : equery b [fichier]
# equery belongs /usr/bin/audacious
ou
# equery b /usr/bin/audacious
For more informations, you can see the official gentoo documentation : gentoolkit
Installation :
# emerge gentoolkit
USE :
Here is some common use about equery :
- List all installed package : equery l
$ equery l
ou
$ equery list
The output of the command is : [---] [--] package.
The first bracket can have these values :
I : installed package
P : Portage
O : Overlay
The second bracket can have these value :
~ : by keywords.
- : by arch
M : masqued
Example :
$ equery l
[ Searching for all packages in all categories among: ]
* installed packages
[I--] [ ] app-admin/eselect-1.1.3 (0)
[I--] [M ] app-admin/eselect-ctags-1.5 (0)
...
- List all dependency of a packet : equery depends [packet]
$ equery depends vim
[ Searching for packages depending on vim... ]
app-vim/gentoo-syntax-20070506 (>=app-editors/vim-7.0)
virtual/editor-0 (app-editors/vim)
- Search at which packet belongs this file : equery b [fichier]
# equery belongs /usr/bin/audacious
ou
# equery b /usr/bin/audacious
For more informations, you can see the official gentoo documentation : gentoolkit
Monday, September 7, 2009
eselect
In this article i will present that we can do with the eselect command.
Definition : eselect is a command to configure and administrate gentoo system.It can be use for example to switch kernel or java version.You have to use this command carrefully.
Installation : It's possible that you need to install before use.To install :
Common use : List possible selection and set one of them
eselect list
Example:
# eselect java-vm list
Available Java Virtual Machines:
[1] sun-jdk-1.5
[2] sun-jdk-1.6 system-vm
# eselect kernel list
Available kernel symlink targets:
[1] linux-2.6.26-gentoo-r3
[2] linux-2.6.27-gentoo-r4
[3] linux-2.6.27-gentoo-r5
[4] linux-2.6.27-gentoo-r7
[5] linux-2.6.28-gentoo
[6] linux-2.6.28-gentoo-r1
[7] linux-2.6.29-gentoo-r2
[8] linux-2.6.29-gentoo-r4
[9] linux-2.6.30-gentoo-r1 *
Set a selection :
# eselect kernel set 1
# eselect kernel set linux-2.6.27-gentoo-r7
Activate fonction to a module :
You can for example activate or disable vim for bash completion.
Example :
Definition : eselect is a command to configure and administrate gentoo system.It can be use for example to switch kernel or java version.You have to use this command carrefully.
Installation : It's possible that you need to install before use.To install :
$ echo app-admin/eselect ~x86 >> /etc/portage/package.keywords
$ emerge -av app-admin/eselect
Common use : List possible selection and set one of them
eselect
Example:
# eselect java-vm list
Available Java Virtual Machines:
[1] sun-jdk-1.5
[2] sun-jdk-1.6 system-vm
# eselect kernel list
Available kernel symlink targets:
[1] linux-2.6.26-gentoo-r3
[2] linux-2.6.27-gentoo-r4
[3] linux-2.6.27-gentoo-r5
[4] linux-2.6.27-gentoo-r7
[5] linux-2.6.28-gentoo
[6] linux-2.6.28-gentoo-r1
[7] linux-2.6.29-gentoo-r2
[8] linux-2.6.29-gentoo-r4
[9] linux-2.6.30-gentoo-r1 *
Set a selection :
# eselect kernel set 1
# eselect kernel set linux-2.6.27-gentoo-r7
Activate fonction to a module :
You can for example activate or disable vim for bash completion.
Example :
$ eselect bashcomp enable vim
http://www.gentoo.org/proj/en/eselect/index.xml
Subscribe to:
Posts (Atom)