Why do I get `bitcoind: command not found` in Ubuntu?



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?

Alex Waters

Posted 2011-09-02T22:21:21.513

Reputation: 3 101



Go to the directory with the bitcoind binary.

Make sure it's executable: chmod +x bitcoind

Now run it: ./bitcoind -daemon

Tom Williams

Posted 2011-09-02T22:21:21.513

Reputation: 872


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

  1. As Andrew mentioned, 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.


Posted 2011-09-02T22:21:21.513

Reputation: 221


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.

Chris Moore

Posted 2011-09-02T22:21:21.513

Reputation: 14 317