help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: guix pull


From: Ricardo Wurmus
Subject: Re: guix pull
Date: Wed, 16 Feb 2022 23:58:37 +0100
User-agent: mu4e 1.6.10; emacs 28.0.91

Gottfried <gottfried@posteo.de> writes:

> Hinweis: Nachdem Sie `PATH' festgelegt haben, sollten Sie `hash guix' 
> ausführen, damit Ihre Shell `/root/.config/guix/current/bin/guix'
> verwendet.
>
> What does it mean? 
>
> How do I "PATH"...

Your shell (by default that’s GNU Bash) has a few builtin commands, but
when you type something like “ls” or “guix” it has to search for an
executable of that name on your disk.

It searches the directories that are listed on the PATH environment
variable.  You can see the value of PATH by running

    echo $PATH

This will be a colon-separated list of directories that can be expected
to contain executables.  When you type “guix” and hit enter your shell
visits the directories listed in this PATH variable one by one until it
finds an executable with the name “guix”.  It then remembers the
location so that it doesn’t have to do all that work again.

The hint above tells you to put ~/.config/guix/current/bin *first* on
the list of directories in the PATH variable, so that when the shell
goes to search for “guix” it will look there first and find
~/.config/guix/current/bin/guix — and not /usr/local/bin/guix or
whatever else might exist on your disk.

Since bash might have already remembered that “guix” corresponds to
“/usr/local/bin/guix” you need to tell it to forget about that and look
again.  That’s what “hash guix” does.

You can set PATH permanently by adding or modifying a line in the
~/.bash_profile file, which is read once when Bash starts.  Or you can
set it just in the current shell session.

In any case, setting this variable is done like this:

    export PATH=/home/gottfried/.config/guix/current/bin:$PATH

This changes the value of PATH so that
“/home/gottfried/.config/guix/current/bin” appears first, followed by
the current value of PATH.  You can add this line to the bottom of
~/.bash_profile and then start a new shell session (e.g. by logging out
and in again).

-- 
Ricardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]