Activate Chia from Anywhere (Linux)

You can set an alias so that inputting chiastart (or whatever you want) will start the Chia virtual environment in Linux.

I was getting annoyed going to my ~/chia-blockchain folder to activate the venv so I made this alias. Add this line to .bashrc or .zshrc:

alias chiastart="cd ~/chia-blockchain && . ./activate && cd $OLDPWD"

$OLDPWD is super cool: Instead of always ending up in ~/chia-blockchain, when you use chiastart you’ll return back to the directory you originally were in.


I added the first two lines of your alias into .profile

I understand all of that except:

I’ve started the Unix course you suggested and have also learned the benefit of using ‘screen’

I’m off to find out what those 3 things above are.

1 Like

I’m so glad you’ve started that Unix course!

You will get to .bashrc/.zshrc sooner or later.

These are just settings for your terminal, basically. It’s a file you can edit and add various things to, like aliases.

Also, this comes up in Google if you want to learn more: bash - What is the purpose of .bashrc and how does it work? - Unix & Linux Stack Exchange