When I want to start Bitcoin I have to use /opt/bitcoin/bin/bitcoind to start it. How can I use simply bitcoind to start it?

I am using centOS 7.


The answer above is correct but doesn't explain anything to the user as to why they can't just type bitcoind in the first place. This doesn't help people at all and future people will just follow this blindly.

To understand why some commands can be typed in without the full path you must understand the $PATH environment variable. A very good writeup on it was done here http://www.linfo.org/path_env_var.html.

A short explination is that $PATH lets you define what paths on your computer are searched for executable files. You can see what the current searched paths are by typing echo $PATH into your terminal. Here is an example from mine.

echo $PATH

Each directory is separated by a : and if a path at /Users/mschuett/bin and /usr/local/bin both included a binary called test-command it would always use the test command found in /Users/mschuett/bin since it comes first in the $PATH string. To add more directories to your $PATH you can simply write..

export $PATH=$PATH:/opt/bitcoin/bin

Now all executables at this path are available without typing the full path. To see what path an executable is being run from you can use which bitcoind and it will output the full path that is used when you run bitcoind.

Hope this helps actually explain what is going on.


The solution is: sudo ln -s /opt/bitcoin/bin/* /bin

I found the answer at https://stackoverflow.com/q/19720475/1364089

Thanks to https://bitcoin.stackexchange.com/users/5406/murch

  • Then don't just link it here, rather put your solution here and additionally link it! :) – Murch Feb 12 '16 at 15:45
  • you could also add /opt/bitcoin/bin to your $PATH – Mark S. Mar 13 '16 at 19:12
  • This is not useful as it doesn't show why this works and it also shows that you have a fundamental misunderstanding of how your OS works. I have written up a better explanation below. – mschuett Mar 13 '16 at 20:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.