<p>there is no faster way to rename , but there are steps you have to rename the bitcoin source code.. for ex let your altcoin's name be : andracoin</p>

<p>First : </p>

<p>inside the <code>src</code> folder use this command :</p>

<pre><code>find ./ -type f -readable  -writable -exec sed -i 's/bitcoin/andracoin/g' {} \;
</code></pre>

<p>then:</p>

<pre><code>find ./ -type f -readable  -writable -exec sed -i 's/Bitcoin/Andracoin/g' {} \;
</code></pre>

<p>then :</p>

<pre><code>find ./ -type f -readable  -writable -exec sed -i 's/BitCoin/AndraCoin/g' {} \;
</code></pre>

<p>then :</p>

<pre><code>find ./ -type f -readable  -writable -exec sed -i 's/BitCoin/AndraCoin/g' {} \;
</code></pre>

<p>then :</p>

<pre><code>find ./ -type f -readable  -writable -exec sed -i 's/BTC/ADC/g' {} \;
</code></pre>

<p>then :</p>

<pre><code>find ./ -type f -readable  -writable -exec sed -i 's/bitcoind/andracoind/g' {} \;
</code></pre>

<p>of course after you rename you will have some issues , but this is the safest way to replace names ...if you don't have a basic information about bitcoin and its blockachain you will have alot of problems during the building process. I recomand to watch this course :</p>

<p><a href="https://www.education-ecosystem.com/elliottminns/l3Xa0-how-to-create-your-own-cryptocurrency-in-c/q9OY7-making-your-own-cryptocurrency-proof-of-work-3/" rel="nofollow noreferrer">How to Create Your Own Cryptocurrency in C++</a></p>

CC BY-SA 4.0
2019-08-16T22:40:20.657Z
2019-08-16T22:40:20.657Z
Ibrahim AL Rashd
<p>To find string with in the files (including binary files), issue the command:</p>

<pre><code>grep -rnw '/home/user/' -e 'bitcoin'
</code></pre>

<p>It will return every single entry for the word bitcoin in your code.</p>

<p>But I do not think that's the best way to get what you have in mind, what about "if" you have a CONST or a variable in the code called const BITCOIN or bitcoin ?</p>

<p>Your approach would be catastrophic for the base code and probably it will not compile. Just do not do that, instead try to find all the points with the command above, once you find all the entries, change it manually (read the code before you do that) and not using find and replace option from your code editor.</p>

CC BY-SA 4.0
2018-12-14T03:20:43.073Z
2018-12-14T03:20:43.073Z
devasia2112
<h2>Some Context</h2>

<p>I am creating my own altcoin for learning purposes and have successfully built the bitcoin code from source with my own genesis block.</p>

<p>Now is it time for me to <strong>change the name of the coin</strong>, so that it is truly my own alt coin.</p>

<p>To do this, I presume that I must change every instance of <code>bitcoin</code> to <code>myaltcoin</code> in the code, so that when I run <code>bitcoin-qt</code> (after the change I hope to be able to run <code>myaltcoin-qt</code>), everything inside the GUI will say <code>myaltcoin</code> and not <code>bitcoin</code>.</p>

<p><strong>How I propose to do this...</strong></p>

<p>I figure that the best way to do this would be to do some kind of case sensitive <code>find and replace</code>, to recursively go through all files and directories and the strings in the files, changing every instance of <code>bitcoin</code> to <code>myaltcoin</code></p>

<h2>The Question</h2>

<p>What is the safest way to do this in the linux terminal? To do this safely I assume I must:</p>

<ol>
<li>Account for case sensitivity.</li>
<li>Replace file names of <code>bitcoin</code> to <code>myaltcoin</code></li>
<li>Replace text instances of <code>bitcoin</code> to <code>myaltcoin</code> within files </li>
<li>Replace <code>bitcoin</code> to <code>myaltcoin</code> in directory names</li>
</ol>

<p>I presume there is some way to do this with <code>find</code>, but I'm not sure what the best way is.</p>

CC BY-SA 4.0
2021-11-15T19:50:39.280Z
look at this https://github.com/cesjavi/createcoin/blob/main/crear.sh . You must edit seed dns "who are HARDCODED" and change it to something else
César Javier Mendoza
<bitcoin-core><bitcoind><altcoin>
What is the safest way to rename my altcoin from "bitcoin" to "myaltcoin" in the source code?
Dev Oskii
# What is the safest way to rename my altcoin from "bitcoin" to "myaltcoin" in the source code?

(Asked by: username_0 on 2017-11-22)

## Some Context

I am creating my own altcoin for learning purposes and have successfully built the bitcoin code from source with my own genesis block.

Now is it time for me to **change the name of the coin**, so that it is truly my own alt coin.

To do this, I presume that I must change every instance of `bitcoin` to `myaltcoin` in the code, so that when I run `bitcoin-qt` (after the change I hope to be able to run `myaltcoin-qt`), everything inside the GUI will say `myaltcoin` and not `bitcoin`.

**How I propose to do this...**

I figure that the best way to do this would be to do some kind of case sensitive `find and replace`, to recursively go through all files and directories and the strings in the files, changing every instance of `bitcoin` to `myaltcoin`

## The Question

What is the safest way to do this in the linux terminal? To do this safely I assume I must:

1. Account for case sensitivity.
2. Replace file names of `bitcoin` to `myaltcoin`
3. Replace text instances of `bitcoin` to `myaltcoin` within files
4. Replace `bitcoin` to `myaltcoin` in directory names

I presume there is some way to do this with `find`, but I'm not sure what the best way is.

**Tags:** bitcoin-core, bitcoind, altcoin

> **Comments:**
> **username_1**: look at this https://github.com/cesjavi/createcoin/blob/main/crear.sh . You must edit seed dns "who are HARDCODED" and change it to something else  

---

## 2 answers

### Answer by username_2 on 2019-08-16. Score: 1 | Accepted answer

there is no faster way to rename , but there are steps you have to rename the bitcoin source code.. for ex let your altcoin's name be : andracoin

First :

inside the `src` folder use this command :

```
find ./ -type f -readable  -writable -exec sed -i 's/bitcoin/andracoin/g' {} \;

```

then:

```
find ./ -type f -readable  -writable -exec sed -i 's/Bitcoin/Andracoin/g' {} \;

```

then :

```
find ./ -type f -readable  -writable -exec sed -i 's/BitCoin/AndraCoin/g' {} \;

```

then :

```
find ./ -type f -readable  -writable -exec sed -i 's/BitCoin/AndraCoin/g' {} \;

```

then :

```
find ./ -type f -readable  -writable -exec sed -i 's/BTC/ADC/g' {} \;

```

then :

```
find ./ -type f -readable  -writable -exec sed -i 's/bitcoind/andracoind/g' {} \;

```

of course after you rename you will have some issues , but this is the safest way to replace names ...if you don't have a basic information about bitcoin and its blockachain you will have alot of problems during the building process. I recomand to watch this course :

[How to Create Your Own Cryptocurrency in C++](https://www.education-ecosystem.com/elliottminns/l3Xa0-how-to-create-your-own-cryptocurrency-in-c/q9OY7-making-your-own-cryptocurrency-proof-of-work-3/)


---

### Answer by username_3 on 2018-12-14. Score: 2

To find string with in the files (including binary files), issue the command:

```
grep -rnw '/home/user/' -e 'bitcoin'

```

It will return every single entry for the word bitcoin in your code.

But I do not think that's the best way to get what you have in mind, what about "if" you have a CONST or a variable in the code called const BITCOIN or bitcoin ?

Your approach would be catastrophic for the base code and probably it will not compile. Just do not do that, instead try to find all the points with the command above, once you find all the entries, change it manually (read the code before you do that) and not using find and replace option from your code editor.


---

