Open all your reddit subscriptions using a single command (alias)


The alias command is considered both good and bad. It can sometimes simplify long and complex commands, but on the other hand it can also be misused to hide commands everyone could learn otherwise.

Long time Linux users have been using alias for many commands and scripts. Even the operating system itself uses alias for certain commands e.g ll for ls -alF, la for ls -A and so on. However, this tutorial is not going to be about simplifying existing commands, rather it is going to be about aliasing your reddit subscriptions.

1. Link in .bashrc

Go to .bashrc (hidden file) in your home directory and add following line

source ~/.alias

We do this, because it does not clutter .bashrc file.

2. Create the script

Create a file called .alias in your home directory with following texts (add or delete links, change names based on your own reddit subscription list)

# reddit
alias rlin='chromium-browser &'
alias rlinn='chromium-browser &'
alias rgaming='chromium-browser &'
alias rgentoo='chromium-browser &'
alias rubuntu='chromium-browser &'
alias rlinq='chromium-browser &'
alias rlinqn='chromium-browser &'
alias rlashow='chromium-browser &'
alias reddit='rlin rlinn rgaming rgentoo rubuntu rlinq rlinqn rlashow'

As you can see, we have given separate names for different reddit links and finally consolidated under a single name (reddit).

All you have to do now is open up a new terminal (so that the .bashrc file gets refreshed) and type reddit. This command should open all your links on chromium-browser (change it to whatever you prefer, or make a variable instead, so that you can change browsers easily).


As we saw, how easy it is to create aliases for links. You can also create aliases for youtube searches, gmail, and pretty much whatever you want to be executed with few and easy commands. I hope this tutorial has given you a starting point to create aliases for different links.

Cheers !!


Leave a comment

Filed under Uncategorized

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s