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
Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. It only takes a minute to sign up.Sign up to join this community
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 /Users/mschuett/Uber/phacility/arcanist/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/mschuett/bin:/usr/local/bin
Each directory is separated by a
: and if a path at
/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..
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
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