A comprehensive bash script for Linux systems that resets system fingerprints, cleans application traces, and provides complete system identity randomization with full backup/restore capabilities.
- Complete System Identity Reset: Changes machine ID, hostname, and MAC addresses
- Application Cleanup: Removes Cursor/VS Code configurations and traces
- Safety First: Comprehensive backup system with one-command restore
- Dual-Boot Safe: Smart MAC randomization options that won't affect Windows
- Dry-Run Mode: Preview all changes before execution
- Root Privilege Management: Smart detection and handling of sudo requirements
- Browser Data Cleanup: Clears Firefox, Chrome, and other browser traces
- History Cleaning: Removes shell command histories
- Network Identity: Multiple MAC randomization options (temporary/permanent)
- Linux system (tested on Kali Linux)
sudo
privileges for system-level changesmacchanger
(automatically installed if missing for permanent MAC changes)systemd
(for hostname management)
-
Clone the repository:
git clone https://github.com/lancedesk/linux-identity-reset-tool.git cd linux-identity-reset-tool
-
Make the script executable:
chmod +x reset_machine.sh
# Preview changes without making them (RECOMMENDED FIRST)
./reset_machine.sh --dry-run
# Interactive mode with confirmations
./reset_machine.sh
# Run with root privileges for full system changes
sudo ./reset_machine.sh
# Restore original system state
./reset_machine.sh undo
# Show help
./reset_machine.sh --help
-
First, see what would change:
./reset_machine.sh --dry-run
-
Run the reset:
sudo ./reset_machine.sh
-
If needed, restore everything:
sudo ./reset_machine.sh undo
If you have a dual-boot system with Windows and Linux, please read this carefully:
MAC address changes affect BOTH operating systems because they modify the physical network adapter at the hardware level. This can cause serious issues in Windows:
- High CPU usage from "Service Host" processes
- Network configuration loops as Windows tries to reconfigure the "new" adapter
- Excessive fan noise due to CPU load
- Network connectivity problems
- Windows Update failures and service disruptions
When the script asks about MAC randomization, you have 3 options:
-
Skip MAC randomization (RECOMMENDED for dual-boot)
- Changes only Linux-specific identifiers
- Windows remains completely unaffected
- Safest option for dual-boot systems
-
Temporary MAC changes
- MAC changes only during Linux session
- Automatically reverts to hardware MAC on reboot
- Windows will see the original MAC
- Safe for dual-boot
-
Permanent MAC changes
- Changes persist across reboots
- WILL affect Windows - may cause high CPU and network issues
- Only use if you understand the consequences
If you already ran the script and Windows is experiencing high CPU usage:
Option A: Restore in Linux
sudo ./reset_machine.sh undo
Option B: Fix in Windows
- Open Device Manager (Win + X → Device Manager)
- Expand "Network adapters"
- Right-click your adapter → Properties
- Go to "Advanced" tab
- Find "Network Address" or "Locally Administered Address"
- Select "Not Present" or delete the value
- Click OK and reboot
Option C: Restore hardware MAC in Linux
# Replace eth0 with your interface name (check with: ip link show)
sudo macchanger -p eth0
sudo reboot
✅ Safe changes (Linux-only):
- Machine ID (
/etc/machine-id
) - D-Bus machine ID
- Hostname changes
- Cursor/VS Code cleanup
- Browser data cleanup
- Shell history cleanup
- Permanent MAC address changes
/etc/machine-id
- System machine identifier/var/lib/dbus/machine-id
- D-Bus machine identifierhostname
and/etc/hostname
- System hostname/etc/hosts
- Updated to prevent "unable to resolve host" errors- MAC addresses (optional - see dual-boot warnings)
~/.cursor
- Cursor editor configurations~/.vscode
- VS Code configurations~/.config/Cursor
- Cursor app data~/.config/Code
- VS Code app data- Browser caches and profiles
- Shell command histories
- New hostname: Random format like
host-a1b2c3d4
- New MAC addresses: Optional - temporary or permanent
- New machine IDs: Fresh system identifiers
- Clean histories: Cleared bash/zsh command histories
The script creates a detailed backup file (~/.fingerprint_reset_backup
) containing:
- Original hostname and
/etc/hostname
- Original
/etc/hosts
entry for hostname resolution - Original machine ID and D-Bus machine ID
- MAC addresses for all network interfaces
- Timestamp and system information
- Detects if running as root or with sudo access
- Provides clear error messages for insufficient privileges
- Suggests using
--dry-run
for testing without privileges
- Shows exactly what files would be deleted
- Previews all system changes before execution
- Safe testing without making any modifications
- Skip: No MAC changes (safest for dual-boot)
- Temporary: Changes revert on reboot
- Permanent: Persistent changes (dual-boot warning displayed)
Option | Description |
---|---|
--dry-run |
Preview changes without executing them |
--help |
Display usage information |
undo |
Restore system from backup |
(no args) | Run in interactive mode |
=== Current System Fingerprints ===
Machine ID: fff172744a6245cda94e6dd013bf4753
Hostname: old-hostname
MAC Addresses:
14:58:d0:03:3f:4a
10:4a:7d:bc:51:ec
=== New Fingerprints ===
Machine ID: 75bf9b225da2448bed95504168cc2a8b
Hostname: host-c44e08l0
MAC Addresses:
26:19:c8:3c:65:02 (temporary - reverts on reboot)
de:61:87:b9:20:e7 (temporary - reverts on reboot)
- Always run
--dry-run
first to see what will change - Choose "Skip" for MAC randomization when prompted
- Keep a backup of important configuration files
- Test on a non-critical system first if possible
- Run
--dry-run
to preview changes - Use permanent MAC changes if needed
- Reboot after reset for full effect
- Keep the backup file safe for undo operations
- Backup important data before running the script
- Run during a maintenance window if possible
- Have physical access to the machine in case of network issues
- Document your original settings for reference
- Reboot recommended after running the script
- Some changes may require a fresh terminal session
- Network connections may need to be re-established
- On dual-boot: Test both operating systems after changes
- User mode:
$HOME/.fingerprint_reset_backup
- Root mode:
/root/.fingerprint_reset_backup
- Each reset overwrites the previous backup
- Only non-loopback interfaces are modified
- Interface names are auto-detected (
eth0
,wlan0
, etc.) - Original MAC addresses are backed up for restoration
- Temporary MACs automatically revert on reboot
- Privacy Enhancement: Change system fingerprints for privacy
- Development Testing: Test software behavior with different system IDs
- Virtualization: Reset VM fingerprints after cloning
- Security Research: Legitimate penetration testing scenarios
- System Administration: Clean slate after system deployment
- Dual-Boot Privacy: Separate identities per OS (skip MAC changes)
"Sudo privileges required"
- Run with
sudo ./reset_machine.sh
- Or use
--dry-run
to preview without privileges
"Unable to resolve host" error after hostname change
- This is now automatically fixed by the script
/etc/hosts
is updated automatically- If you see this, you may be using an old version
"No backup found"
- Backup is only created when running fingerprint reset
- Each reset overwrites the previous backup
"macchanger not found"
- Script automatically installs it for permanent MAC changes
- Manual install:
sudo apt-get install macchanger
- Not needed for temporary MAC changes
High CPU in Windows after running script
- You used permanent MAC changes on a dual-boot system
- See "If Windows Is Already Affected" section above
- Run
./reset_machine.sh undo
or restore in Windows Device Manager
Temporary MAC changes not working
- Ensure you have
ip
command available (part ofiproute2
) - Check network interface names with
ip link show
- Some interfaces may require driver-specific commands
If something goes wrong, you can always restore:
sudo ./reset_machine.sh undo
- ✅ Fixed
/etc/hosts
update to prevent hostname resolution errors - ✅ Added dual-boot safe MAC randomization options
- ✅ Added temporary MAC changes (session-only)
- ✅ Enhanced backup to include
/etc/hosts
entries - ✅ Improved restore functionality for dual-boot systems
- ✅ Added comprehensive dual-boot warnings and guidance
This project is licensed under the MIT License - see the LICENSE file for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This tool is intended for legitimate system administration, privacy enhancement, and security research purposes. Users are responsible for ensuring their use complies with applicable laws and organizational policies. The authors are not responsible for any misuse of this software.
Dual-Boot Warning: MAC address changes affect all operating systems on the same hardware. Always understand the implications before making permanent changes.
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Built for Linux system administrators and privacy-conscious users
- Tested primarily on Kali Linux
- Compatible with most systemd-based distributions
- Community feedback helped improve dual-boot safety
⭐ If this tool helped you, please consider starring the repository!
🔔 For dual-boot users: Always choose "Skip" or "Temporary" MAC randomization to avoid issues!