I'm trying to get a faster way to open the BitPay wallet on Linux (ubuntu). It requires me to write this every time in the terminal:
$ cd Desktop
$ cd BitPay-linux
$ ./BitPayIs there a way to condense this into one script/file that I can run instead?
01 Answer
You can define an alias for this in your .bashrc:
alias bp=~/Desktop/BitPay-linux/BitPay
# or alias bp="cd ~/Desktop/BitPay-linux && ./BitPay"Once defined, you can simply say bp in a terminal window.
Open your ~/.bashrc in an editor. Most likely there are already some aliases defined, like alias ll="ls -l" or something similar. Just add one of the above lines there (or somewhere else) and save the file so it will take effect for all new terminal windows.
I tend to create a new section in my ~/.bashrc with a comment so that all my custom aliases are in one place, like so:
...
######################
# My custom aliases
######################
alias ll="ls -l"
alias ..="cd .."
alias bp="cd ~/Desktop/BitPay-linux && ./BitPay"
...