RMGuard Command Reference
Complete list of the main user-facing RMGuard commands and options.
Main Commands
rmguard --help / rmguard -h
Shows the complete help menu, including usage, options, configuration, bypass methods, and repository links.
rmguard --help
rmguard -h
rmguard --version / rmguard -v
Shows the current installed version, copyright, license, and repository URL.
rmguard --version
rmguard -v
rmguard --status / rmguard -s
Checks whether RMGuard is installed and active in the current shell.
rmguard --status
rmguard -s
rmguard --check-updates / rmguard -c
Checks GitHub releases, compares versions, and can install an available update.
rmguard --check-updates
rmguard -c
Protected rm Usage
Normal Usage
rm file.txt
rm -r directory/
rm -f *.tmp
rm /tmp/test.txt
Blocked Commands
rm -rf /
rm -rf /etc
rm -rf /bin
rm -rf /var
rm -rf /usr
rm --no-preserve-root /
Bypass Methods
RM_GUARD=0 rm -rf /dangerous/path
rm --no-guard -rf /dangerous/path
unset -f rm
export RM_GUARD=0
/bin/rm -rf /path
command rm -rf /path
Use bypass methods only when you know exactly what you are deleting.
Environment Variables
| Name | Purpose |
|---|---|
RM_GUARD | Controls whether RMGuard is active. Use 1 for active and 0 for disabled. |
ALLOW_TOPLEVEL | Defines top-level paths allowed by configuration. |
RM_GUARD_SHELL_LOADED | Internal marker exported when the shell wrapper is loaded. |
Configuration File
RMGuard reads configuration from /etc/rmguard.conf.
# Disable globally (not recommended)
# RM_GUARD=0
# Allowed top-level paths
ALLOW_TOPLEVEL="/tmp /var/tmp"
Install, Activate, Verify
sudo bash ./scripts/install.sh
source /etc/profile
rmguard --status
type rm
Uninstall
cd RMGUARD-Linux
sudo bash ./scripts/uninstall.sh
Summary
| Command | Shortcut | Purpose |
|---|---|---|
rmguard --help | -h | Show help |
rmguard --version | -v | Show version |
rmguard --status | -s | Check status |
rmguard --check-updates | -c | Check updates |