DEV Community

loading...

Discussion on: 9 Evil Bash Commands Explained

Collapse
pauljherring profile image
PJH

"How to prevent possible damage"

Alias - prepend the command with a \

Presuming alias ls='ls --color=auto'
ls will show directories in colour
\ls will not.

Recursion - don't be root. Have user accounts limited in what resources they can use (CPU, disk space etc.)

dd - again, don't be root. Don't be in the disk group either.

chmod - don't be root.