When using infura, our aura start
command requires a flag --rpc <url>
each time we start it up. It can
become tedious to do this on every startup, so here is a simple trick to simplify this!
-
Login to your staking server
-
Type
vi ~/.bashrc
into terminal thenEnter
to entervim
-
Enter
i
to enterINSERT
mode in vim -
Add the following line
alias start="aura start --rpc https://<replace-with-your-rpc-url>"
so your.bashrc
looks similar to below example.
Note: Your
.bashrc
may be slightly different as it is dependent on your environment.
Tip: You can use your arrow keys once in
INSERT
mode to move the cursor to your desired location
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=
# User specific aliases and functions
alias start="aura start --rpc https://<replace-with-your-rpc-url>"
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
- Type
esc
then:wq
thenEnter
to save your changes
All Set! Now just logout and back in and enter start
and your aurad should startup with the proper command!