<p><code>bitcoind</code> is the server, you can interact with it using the command-line utility <code>bitcoin-cli</code>. For example:</p>

<p><code>bitcoin-cli getblocktemplate</code></p>

<p><a href="https://bitcoin.stackexchange.com/questions/32048/difference-between-bitcoin-tx-bitcoin-cli-and-bitcoind">See this question</a> for more info.</p>

CC BY-SA 4.0
2018-11-13T11:20:41.863Z
using "bitcoin-cli getblocktemplate" still yields "bash: bitcoin-cli: command not found.
user35061
CC BY-SA 4.0
2018-11-13T11:51:36.043Z
How did you start `bitcoind` ?
Pieter Wuille
CC BY-SA 4.0
2018-11-14T02:27:22.300Z
I'm running Fedora. I was following various online guides (most of which were based on Ubuntu). I believe that the command that got it going after compiling was: "bitcoind -daemon" but later in my history I also see "src/bitcoind &"
user35061
CC BY-SA 4.0
2018-11-13T11:05:29.973Z
2018-11-13T11:05:29.973Z
chytrik
<blockquote>
  <p><strong>commands like <code>bitcoind getblocktemplate</code></strong></p>
</blockquote>

<p>See <a href="https://bitcoin.stackexchange.com/a/80972/13866">chytrik's answer</a> - you should use the command-line client <code>bitcoin-cli</code> not the server <code>bitcoind</code>.</p>

<blockquote>
  <p><strong>I've attempted to add the src folder to my global path</strong></p>
</blockquote>

<p>That is generally the wrong thing to do.</p>

<ul>
<li>a <code>src</code> directory should contain source code. It isn't appropriate to have that on your <code>$PATH</code>.</li>
<li>start by using the full absolute path, e.g. <code>/home/jpc/Code/WorkingCopies/bitcoin/src/bitcoin-cli getblocktemplate</code> - if that works see below</li>
<li>binaries should be installed to somewhere like <code>/usr/local/bin</code> (or your distro's equivalent - see Linux Standard Base). Usually this is done using <code>sudo make install</code> but check instructions for bitcoin. That folder will already be on your <code>$PATH</code>.</li>
<li>Unless there's a lot of other binaries in a new folder, it is probably better to add an <code>alias</code> rather than make the shell search through a large folder for every command you type.</li>
</ul>

CC BY-SA 4.0
2018-11-14T18:13:33.313Z
Using the full absolute path might have provided a clue. When I do that with 'getblocktemplate' or 'getblockchaininfo' Fedora my prompt doesn't come back. Have to use ctrl c to exit. I'm happy to start with a fresh install if necessary or keep trouble shooting? Maybe that clue helps? Thank you!
user35061
CC BY-SA 4.0
2018-11-14T15:04:42.100Z
2018-11-14T15:04:42.100Z
RedGrittyBrick
<p>I think you should recompile from source.  Visit the bitcoin github repository for Fedora dependencies, you'll find them in doc/build-unix.  Scroll down to Fedora.  Decide whether you want bitcoin-qt or just the command line bitcoin-cli, and whether you really need wallet functionality.</p>

<p>Beware you will need a specific version of Berkeley DB for wallet compatibility.  You can use the latest Berkeley DB though if you don't need or want that compatibility.</p>

<p>Download the source package from <a href="https://bitcoincore.org/en/download/" rel="nofollow noreferrer">https://bitcoincore.org/en/download/</a>. Go into your new src folder, then run</p>

<pre><code>./autogen.sh
./configure --without-gui    # see doc/build-unix.md, also for deps
make check

sudo make install    # goes into /usr/local/bin, /usr/local/lib, by default
</code></pre>

<p>This will likely resolve any issues you have now. You can take the lib paths out of /etc/ld.so.conf and undo changes to your path in ~/.profile.</p>

<p>HTH, let us know how it goes :)</p>

CC BY-SA 4.0
2018-11-14T14:20:57.953Z
Wow. Thanks for the detailed response. I am trying to put src/.libs path which is "/home/jpc/Code/WorkingCopies/bitcoin/src/.libs" in /etc/ld.so.conf using emacs (file was read only) and also the command: "echo "/home/jpc/Code/WorkingCopies/bitcoin/src/.libs" > /etc/ld.so.conf.d/local.conf (get "bash: /etc/ld.so.conf.d/local.conf: permission denied" I realize this is probably linux 101 type stuff. Trying to get up to speed...
user35061
CC BY-SA 4.0
2018-11-14T15:03:47.643Z
You're welcome.  It should be readable and writable by root only, and readable by anyone.  Depends on the distribution.  So you would need root privileges, or sudo vim or e.g. `sudo nano /etc/ld.so.conf` and add your `/home/jpc/Code/WorkingCopies/bitcoin/src/.libs` to it.  Save and exit.  Run `sudo ldconfig`.  Now assuming your binaries are on your PATH, give it another shot and let us know?  It's a bit of a shot in the dark, but it's worth a go.  Good luck!
James Young
CC BY-SA 4.0
2018-11-14T16:34:41.513Z
That worked, /etc/ld.so.conf now reads: include ld.so.conf.d/*.conf (newline) /home/jpc/Code/WorkingCopies/bitcoin/src/.libs (then ran sudo ldconfig) still getting: bitcoin-cli: command not found...
user35061
CC BY-SA 4.0
2018-11-15T02:47:39.940Z
Still sounds like a PATH issue.   Are you using /bin/bash?  Try putting `PATH="/home/jpc/Code/WorkingCopies/bitcoin/src:$PATH"` in your `~/.profile` at the end, then run `source .profile`.  Stop any bitcoind you might have running, and try running `bitcoind -daemon`.  Then `bitcoin-cli getblockchaininfo` and we'll see...  Are you sure that's the absolute path to where bitcoind and bitcoin-cli binaries are?  Good luck again!
James Young
CC BY-SA 4.0
2018-11-14T13:10:12.567Z
2018-11-16T00:54:29.870Z
2018-11-16T00:54:29.870Z
James Young
<p>I wasn't able to trouble shoot my original binary build, but I used the suggestion James Young made: Reinstall from the bitcoincore.org website tar image. I used the linux build instructions at:</p>

<p><a href="https://bitcoin.org/en/full-node#other-linux-distributions" rel="nofollow noreferrer">https://bitcoin.org/en/full-node#other-linux-distributions</a> </p>

<p>I just needed to update the release version in the commands.</p>

<p>Thank you for all the suggestions. I learned a few good things.</p>

CC BY-SA 4.0
2018-11-15T02:55:15.517Z
Note: if you download binary files instead of compiling yourself, be sure to check the developer signatures on the .tar files.
chytrik
CC BY-SA 4.0
2018-11-14T19:46:38.337Z
2018-11-14T19:46:38.337Z
user35061
<p>running <code>ps</code> yields:</p>

<pre><code>31793 pts/0     11:04:46 bitcoind
</code></pre>

<p>but commands like <code>bitcoind getblocktemplate</code></p>

<p>yields: </p>

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

<p>I've attempted to add the <code>src</code> folder to my global path through the following command:</p>

<pre><code>echo " export PATH=$PATH:/home/jpc/Code/WorkingCopies/bitcoin/src" &gt;&gt; ~/.profile
</code></pre>

<p>Thanks for any help.</p>

CC BY-SA 4.0
2018-11-13T15:43:15.800Z
It sounds like this is more about basic Unix usage than anything specific to bitcoin.  I would change into the directory where `bitcoin-cli` is located and run `./bitcoin-cli`.  Changing PATH like you did is probably not really a good idea, but that's a question for http://unix.stackexchange.com instead of here.
Nate Eldredge
<bitcoind>
running bitcoind for the first time - can't interact. keep getting command not found
user35061
# running bitcoind for the first time - can't interact. keep getting command not found

(Asked by: username_0 on 2018-11-13)

running ps yields:
31793 pts/0     11:04:46 bitcoind

but commands like bitcoind getblocktemplate
yields: 
bash: bitcoind: command not found...

I've attempted to add the src folder to my global path through the following command:
echo " export PATH=$PATH:/home/jpc/Code/WorkingCopies/bitcoin/src" >> ~/.profile

Thanks for any help.

**Tags:** bitcoind

> **Comments:**
> **username_1**: It sounds like this is more about basic Unix usage than anything specific to bitcoin.  I would change into the directory where `bitcoin-cli` is located and run `./bitcoin-cli`.  Changing PATH like you did is probably not really a good idea, but that's a question for http://unix.stackexchange.com instead of here.  

---

## 4 answers

### Answer by username_2 on 2018-11-13. Score: 3

`bitcoind` is the server, you can interact with it using the command-line utility `bitcoin-cli`. For example:

`bitcoin-cli getblocktemplate`

[See this question](https://bitcoin.stackexchange.com/questions/32048/difference-between-bitcoin-tx-bitcoin-cli-and-bitcoind) for more info.

> **Comments:**
> **username_0**: using "bitcoin-cli getblocktemplate" still yields "bash: bitcoin-cli: command not found.  
> **username_3**: How did you start `bitcoind` ?  
> **username_0**: I'm running Fedora. I was following various online guides (most of which were based on Ubuntu). I believe that the command that got it going after compiling was: "bitcoind -daemon" but later in my history I also see "src/bitcoind &"  

---

### Answer by username_4 on 2018-11-14. Score: 0

> **commands like `bitcoind getblocktemplate`**

See [username_2's answer](https://bitcoin.stackexchange.com/a/80972/13866) - you should use the command-line client `bitcoin-cli` not the server `bitcoind`.

> **I've attempted to add the src folder to my global path**

That is generally the wrong thing to do.

* a `src` directory should contain source code. It isn't appropriate to have that on your `$PATH`.
* start by using the full absolute path, e.g. `/home/jpc/Code/WorkingCopies/bitcoin/src/bitcoin-cli getblocktemplate` - if that works see below
* binaries should be installed to somewhere like `/usr/local/bin` (or your distro's equivalent - see Linux Standard Base). Usually this is done using `sudo make install` but check instructions for bitcoin. That folder will already be on your `$PATH`.
* Unless there's a lot of other binaries in a new folder, it is probably better to add an `alias` rather than make the shell search through a large folder for every command you type.

> **Comments:**
> **username_0**: Using the full absolute path might have provided a clue. When I do that with 'getblocktemplate' or 'getblockchaininfo' Fedora my prompt doesn't come back. Have to use ctrl c to exit. I'm happy to start with a fresh install if necessary or keep trouble shooting? Maybe that clue helps? Thank you!  

---

### Answer by username_5 on 2018-11-14. Score: 0

I think you should recompile from source.  Visit the bitcoin github repository for Fedora dependencies, you'll find them in doc/build-unix.  Scroll down to Fedora.  Decide whether you want bitcoin-qt or just the command line bitcoin-cli, and whether you really need wallet functionality.
Beware you will need a specific version of Berkeley DB for wallet compatibility.  You can use the latest Berkeley DB though if you don't need or want that compatibility.
Download the source package from https://bitcoincore.org/en/download/. Go into your new src folder, then run
./autogen.sh
./configure --without-gui    # see doc/build-unix.md, also for deps
make check

sudo make install    # goes into /usr/local/bin, /usr/local/lib, by default

This will likely resolve any issues you have now. You can take the lib paths out of /etc/ld.so.conf and undo changes to your path in ~/.profile.
HTH, let us know how it goes :)

> **Comments:**
> **username_0**: Wow. Thanks for the detailed response. I am trying to put src/.libs path which is "/home/jpc/Code/WorkingCopies/bitcoin/src/.libs" in /etc/ld.so.conf using emacs (file was read only) and also the command: "echo "/home/jpc/Code/WorkingCopies/bitcoin/src/.libs" > /etc/ld.so.conf.d/local.conf (get "bash: /etc/ld.so.conf.d/local.conf: permission denied" I realize this is probably linux 101 type stuff. Trying to get up to speed...  
> **username_5**: You're welcome.  It should be readable and writable by root only, and readable by anyone.  Depends on the distribution.  So you would need root privileges, or sudo vim or e.g. `sudo nano /etc/ld.so.conf` and add your `/home/jpc/Code/WorkingCopies/bitcoin/src/.libs` to it.  Save and exit.  Run `sudo ldconfig`.  Now assuming your binaries are on your PATH, give it another shot and let us know?  It's a bit of a shot in the dark, but it's worth a go.  Good luck!  
> **username_0**: That worked, /etc/ld.so.conf now reads: include ld.so.conf.d/*.conf (newline) /home/jpc/Code/WorkingCopies/bitcoin/src/.libs (then ran sudo ldconfig) still getting: bitcoin-cli: command not found...  
> **username_5**: Still sounds like a PATH issue.   Are you using /bin/bash?  Try putting `PATH="/home/jpc/Code/WorkingCopies/bitcoin/src:$PATH"` in your `~/.profile` at the end, then run `source .profile`.  Stop any bitcoind you might have running, and try running `bitcoind -daemon`.  Then `bitcoin-cli getblockchaininfo` and we'll see...  Are you sure that's the absolute path to where bitcoind and bitcoin-cli binaries are?  Good luck again!  

---

### Answer by username_0 on 2018-11-14. Score: 0

I wasn't able to trouble shoot my original binary build, but I used the suggestion username_5 made: Reinstall from the bitcoincore.org website tar image. I used the linux build instructions at:

<https://bitcoin.org/en/full-node#other-linux-distributions>

I just needed to update the release version in the commands.

Thank you for all the suggestions. I learned a few good things.

> **Comments:**
> **username_2**: Note: if you download binary files instead of compiling yourself, be sure to check the developer signatures on the .tar files.  

---

