Unix pranks to slowly drive your friends mad
Tags: pranks, fun, unix, terminal
Published: 2019-10-17 06:43:31

---
title: Unix pranks to slowly drive your friends mad
published: true
description: 5 pranks that run on the Terminal
tags: pranks, fun, Unix, Terminal
---

I made a small, fun list of pranks to troll people. I'm looking forward to see what ideas you have, so please add them in the comments.

# 1. Slow down their Terminal.

![Bash code to slowly slowdown terminal startup](https://raw.githubusercontent.com/zeroby0/pranks/master/img/whitepng/1.png)

Every time a new Terminal is started, it's slowed down by .1 seconds. 😈


# 2. Change `ssh` folder to `shh`

![Sneaky fox changes ssh folder to shh](https://pbs.twimg.com/media/DoNJnTNW0AEXAFk?format=jpg&name=900x900)


From this: https://twitter.com/nixcraft/status/1045760653510815744

# 3. Change Editors!

![Vim opens Emacs, nano opens Vi, etc.](https://raw.githubusercontent.com/zeroby0/pranks/master/img/whitepng/7.png)

Vim opens emacs, nano opens vi, and so on. [I've been called one of Top ten evil people for this 😂](https://github.com/mathiasbynens/evil.sh/pull/76#issuecomment-542821242)

# 4. Make `date` return random dates

![date function returns random date](https://raw.githubusercontent.com/zeroby0/pranks/master/img/whitepng/9.1.png)

Similarly, for the `cal` command,

![Make cal return Calender for random years](https://raw.githubusercontent.com/zeroby0/pranks/master/img/whitepng/9.2.png)

# 5. Make `cat` print an actual cat!

This happens randomly. The base64 string is for the cat.

```
function cat() {
	rdm=$(( ((RANDOM<<15)|RANDOM) % 5000 ));
	if test $rdm -lt 400
	then
		base64 -D <<< "ICAgICAgICAgICAgICAgICAgVC4iLS5fLi4tLS0uLl8sLSIvfAogICAgICAgICAgICAgICAgICBsfCItLiAgXy52Ll8gICAoIiB8CiAgICAgICAgICAgICAgICAgIFtsIC8uJ18gXDsgX34iLS5gLXQKICAgICAgICAgICAgICAgICAgWSAiIF8ob30gX3tvKS5fIF4ufAogICAgICAgICAgICAgICAgICBqICBUICAsLTx2Pi0uICBUICBdCiAgICAgICAgICAgICAgICAgIFwgIGwgKCAvLV4tXCApICEgICEKICAgICAgICAgICAgICAgICAgIFwuIFwuICAifiIgIC4vICAvYy0uLixfXwogICAgICAgICAgICAgICAgICAgICBeci0gLi5fIC4tIC4tIiAgYC0gLiAgfiItLS4KICAgICAgICAgICAgICAgICAgICAgID4gXC4gICAgICAgICAgICAgICAgICAgICAgXAogICAgICAgICAgICAgICAgICAgICAgXSAgIF4uICAgICAgICAgICAgICAgICAgICAgXAogICAgICAgICAgICAgICAgICAgICAgMyAgLiAgIj4gICAgICAgICAgICAuICAgICAgIFkKICAgICAgICAgLC5fXy4tLS5fICAgX2ogICBcIH4gICAuICAgICAgICAgOyAgICAgICB8CiAgICAgICAgKCAgICB+Ii0uX34iXi5fXCAgIF4uICAgIF4uXyAgICAgIEkgICAgIC4gbAogICAgICAgICAiLS5fIF9fXyB+Ii0sXzcgICAgLlotLl8gICA3IiAgIFkgICAgICA7ICBcICAgICAgICBfCiAgICAgICAgICAgIC8iICAgIn4tKHIgciAgXy9fLS0uX34tLyAgICAvICAgICAgLywuLS1eLS5fICAgLyBZCiAgICAgICAgICAgICItLl8gICAgJyJ+fn4+LS5ffl0+LS1eLS0tLi9fX19fLC5efiAgICAgICAgXi5eICAhCiAgICAgICAgICAgICAgICB+LS0uXyAgICAnICAgWS0tLS4gICAgICAgICAgICAgICAgICAgICAgICBcLi8KICAgICAgICAgICAgICAgICAgICAgfn4tLS5fICBsXyAgICkgICAgICAgICAgICAgICAgICAgICAgICBcCiAgICAgICAgICAgICAgICAgICAgICAgICAgIH4tLl9+fn4tLS0uXyxfX19fLi4tLS0gICAgICAgICAgIFwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH4tLS0tIn4gICAgICAgXAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXA=="
	else
		/bin/cat $1
	fi;
}
```

![Cat prints an actual cat](https://raw.githubusercontent.com/zeroby0/pranks/master/img/showcat.png)


---



I have a GitHub repository with more pranks and copy-paste-able code: [zeroby0/pranks](https://github.com/zeroby0/pranks). You can find more pranks at Mathias Bynens' [Evil.sh](https://github.com/mathiasbynens/evil.sh)



Also, Hi! I don't believe we've met before. I'm [Aravind](https://aravindvoggu.in/). I program micro-controllers, and design websites. Take care not to cause damage while you have fun. 

Have a great day! (or night, wherever you are)