Skip to content

Tag: linux

All the articles with the tag "linux".

trap in Bash: Clean Up When Your Script Dies

trap in Bash: Clean Up When Your Script Dies

· Updated:

Use trap EXIT to clean up temp files, INT/TERM for graceful shutdown, and ERR for errors. Stop your bash scripts from leaving messes when they die.

Bash Arithmetic Without bc

Bash Arithmetic Without bc

Bash does arithmetic natively, so you can drop bc for most math. Arithmetic expansion, conditions, bitwise operators, and the trap inside $(( )).

Ventoy: Boot Any OS, Any Time

Ventoy: Boot Any OS, Any Time

· Updated:

Ventoy turns any USB drive into a multi-boot drive, drop ISOs on it and boot any OS without re-flashing the drive each time.

The sudoers Mistake Everyone Makes Once

The sudoers Mistake Everyone Makes Once

One syntax error in /etc/sudoers locks everyone out of root. Use visudo, read the syntax properly, avoid the common mistakes, and know what NOPASSWD gives.