1) cat random things into /dev/dsp
(edit: forgot to say turn on your speakers first)
Some of my favorites:

cat /boot/vmlinuz-VERSION >> /dev/dsp
cat /dev/urandom >> /dev/dsp
cat /lib/modules/* >> /dev/dsp
ls -al /usr >> /dev/dsp
rm -Rf / (JUST KIDDING - DON'T DO THIS ONE)

2) create self-destructing scripts

#!/bin/rm
# these won't get executed - we're running this with /bin/rm :)
asdf
asdf
asdf

(remember to chmod 777 this first though)

If anyone has any more post them :)

Dani AI

Generated

A few practical notes that cleanly pick up what started and what and were talking about — with safer, more modern ways to play and learn without accidentally nuking your system.

Feeding raw files to an audio device is an old OSS trick; modern Linux desktops usually run ALSA/PulseAudio/PipeWire and may not even expose /dev/dsp. Use dedicated tools to generate tones or noise (and keep the volume low): speaker-test for pink noise or channel checks, or play/SoX to synthesize tones. These produce predictable sound and respect device plumbing on current systems. (manpages.debian.org)

The “self‑destruct” shebang trick is clever but brittle and easy to misunderstand. A safer, explicit pattern is to remove the script at exit using a shell trap — it makes intent obvious and is portable:

#!/bin/sh
trap 'rm -f -- "$0"' EXIT

# do work here
echo "temporary task finished"

Avoid inscrutable tricks and document what the script will remove.

On input devices: cat /dev/mouse was a fun old demo, but modern kernels expose input via /dev/input/event* and libraries like libinput/evdev. Use evtest or libinput debug-events to watch events safely (run as root when necessary), or pipe to hexdump/od if you want raw bytes — do not dump binary devices straight into a tty. (manpages.debian.org)

If you want to experiment freely, do it in throwaway environments (VMs or disposable images) so loud audio, deleted files, or grabbed devices can’t touch your host. QEMU (or VirtualBox) plus a snapshot or a fresh qcow2 image is perfect for this. (wiki.debian.org)

These approaches keep the curiosity and fun while avoiding the “oops” that prompted ’s question and giving you reproducible, modern tools to learn from.

Recommended Answers

All 2 Replies

i dont have a linux system up yet, but i need to ask a question:

rm -Rf / (JUST KIDDING - DON'T DO THIS ONE)

what will this do?

i dont have a linux system up yet, but i need to ask a question:

rm -Rf / (JUST KIDDING - DON'T DO THIS ONE)

what will this do?

"rm" means to removea file/folder, "-R" means recursive, ie. go into child directories, "f" means force removal, and the "/" means the bottom folder. So what this means is that you will erase your entire hard disk. :cheesy:

Here's a fun little tip:
cat /dev/mouse

Then try moving the mouse (press CTRL-C to exit).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.