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

<p>To understand why some commands can be typed in without the full path you must understand the <code>$PATH</code> environment variable. A very good writeup on it was done here <a href="http://www.linfo.org/path_env_var.html" rel="nofollow">http://www.linfo.org/path_env_var.html</a>. </p>

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

<pre><code>echo $PATH
/Users/mschuett/Uber/phacility/arcanist/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/mschuett/bin:/usr/local/bin
</code></pre>

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

<pre><code>export $PATH=$PATH:/opt/bitcoin/bin
</code></pre>

<p>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 <code>which bitcoind</code> and it will output the full path that is used when you run <code>bitcoind</code>.</p>

<p>Hope this helps actually explain what is going on.</p>

CC BY-SA 3.0
2016-03-13T20:15:30.420Z
2016-03-13T20:15:30.420Z
michael.schuett
<p>The solution is: sudo <code>ln -s /opt/bitcoin/bin/* /bin</code></p>

<p>I found the answer at <a href="https://stackoverflow.com/q/19720475/1364089">https://stackoverflow.com/q/19720475/1364089</a></p>

<p>Thanks to <a href="https://bitcoin.stackexchange.com/users/5406/murch">https://bitcoin.stackexchange.com/users/5406/murch</a></p>

CC BY-SA 3.0
2016-02-12T15:45:01.217Z
Then don't just link it here, rather put your solution here and additionally link it! :)
Murch
CC BY-SA 3.0
2016-03-13T19:12:29.507Z
you could also add /opt/bitcoin/bin to your $PATH
Mark S.
CC BY-SA 3.0
2016-03-13T20:16:29.140Z
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.
michael.schuett
CC BY-SA 3.0
2016-02-12T14:56:19.080Z
2016-02-12T16:10:07.470Z
2017-05-23T12:34:59.703Z
Jan Wytze
<p>When I want to start Bitcoin I have to use <code>/opt/bitcoin/bin/bitcoind</code> to start it. How can I use simply  <code>bitcoind</code> to start it?</p>

<p>I am using <code>centOS 7</code>.</p>

CC BY-SA 3.0
2016-02-12T14:35:17.813Z
related: http://stackoverflow.com/q/19720475/1364089
Murch
<bitcoind><linux>
How can I make Bitcoin start with a simple `bitcoind` in the terminal?
Jan Wytze
# How can I make Bitcoin start with a simple `bitcoind` in the terminal?

(Asked by: username_0 on 2016-02-12)

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`.

**Tags:** bitcoind, linux

> **Comments:**
> **username_1**: related: http://stackoverflow.com/q/19720475/1364089  

---

## 2 answers

### Answer by username_2 on 2016-03-13. Score: 1

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 /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.


---

### Answer by username_0 on 2016-02-12. Score: 0

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>

> **Comments:**
> **username_1**: Then don't just link it here, rather put your solution here and additionally link it! :)  
> **username_3**: you could also add /opt/bitcoin/bin to your $PATH  
> **username_2**: 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.  

---

