<p><code>lnd</code> is not in your <code>$PATH</code> you need to update your .bashrc file, add those lines to it</p>
<pre><code>export GOPATH=~/go
export PATH=$PATH:$GOPATH/bin:/usr/local/go/bin 
</code></pre>
<p>then after saving your changes reload the file with <code>source ~/.bashrc</code> now it should work, if not you can still run it directly with its full path <code>/usr/local/go/bin/lnd</code></p>
<p>If you want to install on what I suppose is an external do that:</p>
<p>lets assume your external hard drive is mounted on <code>/mnt/external_hd</code> first lets go to it <code>cd /mnt/external_hd/lnd</code> then build <code>lnd</code> and <code>lncli</code> <code>make &amp;&amp; make install</code> then update your bashrc export</p>
<pre><code>GOPATH=/mnt/external_hd/go
export PATH=$PATH:$GOPATH/bin
</code></pre>
<p>then we load bashrc <code>source ~/.bashrc</code></p>

CC BY-SA 4.0
2023-04-01T08:46:13.950Z
No its not working. /usr/local/local/go/bin and then lnd says lnd is a directory. when I go cd lnd I have: cert, healthcheck, lnd, ticker, tor, clock, kvdb, queue and tlv. lnd is a directory again. cd lnd again and there are the same folder inside but not a lnd folder again. Probably I made something wrong but lnd command is not working there as well
Luca F
CC BY-SA 4.0
2023-04-01T09:01:52.100Z
Maybe I found it. after redoing everything inside of the external hard drive in ..../lnd/cmd I have the folder lncli and lnd. In lnd there is a main.go and in lncli are a lot .go files. Is this the location I need?
Luca F
CC BY-SA 4.0
2023-04-01T11:49:38.487Z
Installing LND on the SD Card works perfectly. Then everything works. but what do I have to do to install it from the mnt/ ?
Luca F
CC BY-SA 4.0
2023-04-03T08:12:27.347Z
I updated my answer for when you want to install it from the mnt/
Saxtheowl
CC BY-SA 4.0
2023-04-01T07:08:23.867Z
2023-04-03T08:18:53.997Z
2023-04-03T08:18:53.997Z
Saxtheowl
<p>I want to run a lightning node. I already have bitcoin full node on a raspberry pi 4 external hard drive and I installed lnd on the hard drive like this:</p>
<pre><code>git clone https://github.com/lightningnetwork/lnd
cd lnd
make install
</code></pre>
<p>Executing the command: lnd</p>
<pre><code>lnd: command not found
</code></pre>
<pre><code>echo $GOPATH
/home/my-name/go
</code></pre>
<p>My .bashrc</p>
<pre><code>export GOPATH=~/go
export PATH=$PATH:$GOPATH/bin
</code></pre>
<pre><code>echo $PATH
:/usr/local/go/bin
</code></pre>
<p>Installing process gave no error.
Where would the lnd be?</p>
<p>The question is asked already but not helpful for me. I already did it</p>
<pre><code>find /usr/local -name lnd
/usr/local/go/bin/lnd
/usr/local/go/bin/lnd/lnd
</code></pre>
<p>find /home/myname -name lnd gives back nothing.</p>
<p>Thanks in advance</p>

<lightning-network-daemon><compiling><installation>
lnd Command not found after installing from source
Luca F
# lnd Command not found after installing from source

(Asked by: username_0 on 2023-03-31)

I want to run a lightning node. I already have bitcoin full node on a raspberry pi 4 external hard drive and I installed lnd on the hard drive like this:
git clone https://github.com/lightningnetwork/lnd
cd lnd
make install

Executing the command: lnd
lnd: command not found

echo $GOPATH
/home/my-name/go

My .bashrc
export GOPATH=~/go
export PATH=$PATH:$GOPATH/bin

echo $PATH
:/usr/local/go/bin

Installing process gave no error.
Where would the lnd be?
The question is asked already but not helpful for me. I already did it
find /usr/local -name lnd
/usr/local/go/bin/lnd
/usr/local/go/bin/lnd/lnd

find /home/myname -name lnd gives back nothing.
Thanks in advance

**Tags:** lightning-network-daemon, compiling, installation


---

## 1 answers

### Answer by username_1 on 2023-04-01. Score: 0 | Accepted answer

lnd is not in your $PATH you need to update your .bashrc file, add those lines to it
export GOPATH=~/go
export PATH=$PATH:$GOPATH/bin:/usr/local/go/bin 

then after saving your changes reload the file with source ~/.bashrc now it should work, if not you can still run it directly with its full path /usr/local/go/bin/lnd
If you want to install on what I suppose is an external do that:
lets assume your external hard drive is mounted on /mnt/external_hd first lets go to it cd /mnt/external_hd/lnd then build lnd and lncli make && make install then update your bashrc export
GOPATH=/mnt/external_hd/go
export PATH=$PATH:$GOPATH/bin

then we load bashrc source ~/.bashrc

> **Comments:**
> **username_0**: No its not working. /usr/local/local/go/bin and then lnd says lnd is a directory. when I go cd lnd I have: cert, healthcheck, lnd, ticker, tor, clock, kvdb, queue and tlv. lnd is a directory again. cd lnd again and there are the same folder inside but not a lnd folder again. Probably I made something wrong but lnd command is not working there as well  
> **username_0**: Maybe I found it. after redoing everything inside of the external hard drive in ..../lnd/cmd I have the folder lncli and lnd. In lnd there is a main.go and in lncli are a lot .go files. Is this the location I need?  
> **username_0**: Installing LND on the SD Card works perfectly. Then everything works. but what do I have to do to install it from the mnt/ ?  
> **username_1**: I updated my answer for when you want to install it from the mnt/  

---

