<p>Also, if you want to just run <code>bitcoind</code> (without <code>./bitcoind</code>), add it to your executable path:</p>

<ol>
<li>As Andrew <a href="https://bitcoin.stackexchange.com/questions/474/why-do-i-get-bitcoind-command-not-found-in-ubuntu/475#475">mentioned</a>, first be sure to <strong><code>chmod +x bitcoind</code></strong> in your <code>src</code> directory.</li>
<li>Still in the <code>src</code> directory, run <strong><code>pwd</code></strong> to get the full path (for example <code>/home/alex/src</code>)</li>
<li>Add it to your .profile with <strong><code>echo "export PATH=$PATH:/home/alex/src" &gt;&gt; ~/.profile</code></strong></li>
</ol>

<p>Now you can execute <code>bitcoind</code> from anywhere in your system when logged with your user.</p>

CC BY-SA 3.0
2011-09-03T03:13:48.577Z
2011-09-03T03:13:48.577Z
2017-04-13T12:47:33.610Z
jmonteiro
<p>I put this line in my <code>/home/chris/.bashrc</code> file:</p>

<pre><code>alias bc='/home/chris/src/bitcoin/src/bitcoind'
</code></pre>

<p>Then (after starting a new terminal) I can type just <code>bc</code> instead of <code>bitcoind</code>.  There's no need to edit your PATH variable if you use an alias like this.</p>

<p>You'll need to change the <code>/home/chris/src/bitcoin/src/bitcoind</code> bit to match the correct location of the <code>bitcoind</code> executable on your system.</p>

<p>It's also OK to do this:</p>

<pre><code>alias bitcoind='/home/chris/src/bitcoin/src/bitcoind'
</code></pre>

<p>if you want to type <code>bitcoind</code> out in full to run it.  It may look like a recursive definition, but it's fine.</p>

CC BY-SA 4.0
2021-06-16T03:36:23.820Z
Note that `alias`es only work at an interactive prompt and do not work inside shell scripts.
bigjosh
CC BY-SA 3.0
2012-02-20T08:25:09.703Z
2012-02-20T08:25:09.703Z
Chris Moore
<p>Go to the directory with the <code>bitcoind</code> binary.</p>

<p>Make sure it's executable:
<code>chmod +x bitcoind</code></p>

<p>Now run it:
<code>./bitcoind -daemon</code></p>

CC BY-SA 3.0
2011-09-02T22:41:57.380Z
2011-09-02T22:41:57.380Z
Tom Williams
<p>I have built the bitcoin source on my Ubuntu desktop, and have installed the proper libraries via apt-get and building some. </p>

<p>When I do:</p>

<pre><code>cd src
bitcoind -daemon
</code></pre>

<p>I get the error:</p>

<pre><code>bitcoind: command not found
</code></pre>

<p>and when I do <code>./bitcoin</code> I get:</p>

<pre><code>bash: ./bitcoin: No such file or directory
</code></pre>

<p>What am I doing wrong?</p>

<ubuntu><bitcoind>
Why do I get `bitcoind: command not found` in Ubuntu?
Alex Waters
# Why do I get `bitcoind: command not found` in Ubuntu?

(Asked by: username_0 on 2011-09-02)

I have built the bitcoin source on my Ubuntu desktop, and have installed the proper libraries via apt-get and building some. 
When I do:
cd src
bitcoind -daemon

I get the error:
bitcoind: command not found

and when I do ./bitcoin I get:
bash: ./bitcoin: No such file or directory

What am I doing wrong?

**Tags:** ubuntu, bitcoind


---

## 3 answers

### Answer by username_4 on 2011-09-02. Score: 15 | Accepted answer

Go to the directory with the `bitcoind` binary.

Make sure it's executable:
`chmod +x bitcoind`

Now run it:
`./bitcoind -daemon`


---

### Answer by username_1 on 2011-09-03. Score: 6

Also, if you want to just run `bitcoind` (without `./bitcoind`), add it to your executable path:

1. As Andrew [mentioned](https://bitcoin.stackexchange.com/questions/474/why-do-i-get-bitcoind-command-not-found-in-ubuntu/475#475), first be sure to **`chmod +x bitcoind`** in your `src` directory.
2. Still in the `src` directory, run **`pwd`** to get the full path (for example `/home/alex/src`)
3. Add it to your .profile with **`echo "export PATH=$PATH:/home/alex/src" >> ~/.profile`**

Now you can execute `bitcoind` from anywhere in your system when logged with your user.


---

### Answer by username_2 on 2012-02-20. Score: 0

I put this line in my /home/chris/.bashrc file:
alias bc='/home/chris/src/bitcoin/src/bitcoind'

Then (after starting a new terminal) I can type just bc instead of bitcoind.  There's no need to edit your PATH variable if you use an alias like this.
You'll need to change the /home/chris/src/bitcoin/src/bitcoind bit to match the correct location of the bitcoind executable on your system.
It's also OK to do this:
alias bitcoind='/home/chris/src/bitcoin/src/bitcoind'

if you want to type bitcoind out in full to run it.  It may look like a recursive definition, but it's fine.

> **Comments:**
> **username_3**: Note that `alias`es only work at an interactive prompt and do not work inside shell scripts.  

---

