Q:

How to safely execute batch file viruses for practice?

I'm following a tutorial on fork bomb and thought it was pretty interesting. TL;DR: It's basically just a program that replicates itself until the computer freezes/crashes.
I want to see how it actually looks like when executing but don't want to screw up my computer. What's a safe way to try out batch file viruses?

A:

You can run it in a virtual machine. A virtual machine emulates a computer on your computer. You can give it a limited amount of resources (CPU's, memory) and the environment on the virtual machine can not access the computer it runs on. Popular software to run virtual machines are VirtualBox and VMWare.

