Tuesday, February 10, 2026

disk size linux

Linux Root Disk Usage Checker

Linux Root Disk Usage Checker

Quick reference for checking and cleaning up a 100% full root (/) filesystem. Use with caution—avoid deleting system files!

Check Overall Usage

df -h /
df -h

Shows root filesystem usage in human-readable format (GB/MB).

Find Largest Directories

sudo du -h --max-depth=1 / | sort -rh | head -n 10

Lists top 10 largest top-level directories under /. Drill deeper: sudo du -h --max-depth=1 /var | sort -rh.
Common culprits: /var/log, /var/cache, /tmp, /home.

Locate Largest Files

sudo du -ah / 2>/dev/null | sort -rh | head -n 20

Shows 20 largest files system-wide (ignores permission errors).

Large files only: sudo find /var -type f -size +100M -exec ls -lh {} \;

Interactive Analyzer (ncdu)

Install:

# Debian/Ubuntu
sudo apt update && sudo apt install ncdu

# Fedora/RHEL
sudo dnf install ncdu

Run:

sudo ncdu /

Navigate with arrows, 'd' to delete, 'q' to quit. Perfect for visual exploration.

Safe Cleanup Tips

  • Logs: sudo journalctl --vacuum-time=7d (systemd) or sudo rm -rf /var/log/*.old
  • Cache: sudo apt autoclean (Debian) or check /var/cache
  • Temp: sudo rm -rf /tmp/* (safe if no processes using files)
  • Never delete: /bin, /etc, /lib, /sbin, /usr

Quick Copy-Paste Workflow

  1. df -h /
  2. sudo du -h --max-depth=1 / | sort -rh | head -n 10
  3. sudo ncdu /

Copy this entire HTML file and paste into your Google Blogger/HTML editor for instant blog post!

Wednesday, January 7, 2026

Optimizing Colima for Apple Silicon (M1/M2/M3) Macs - Switch from Intel Emulation to Native Performance

Published: January 7, 2026

If you're running Colima on an Apple Silicon Mac and experiencing slow performance, you might be running it in Intel emulation mode. This guide will show you how to switch to native ARM64 performance for dramatically better speed and efficiency.

The Problem

Many developers unknowingly run Colima with Intel emulation (x86_64), which:

  • ❌ Uses software emulation (slow)
  • ❌ Consumes more battery
  • ❌ Increases CPU usage
  • ❌ Results in slower container operations

The Solution

Use Apple's native Virtualization.framework with VirtioFS for optimal performance.

The Optimal Command

colima start --vm-type=vz --mount-type=virtiofs

Why This Works

--vm-type=vz (Apple Virtualization.framework):

  • ✅ Native ARM64 performance (no emulation)
  • ✅ Better macOS integration
  • ✅ Lower resource usage
  • ✅ Hardware acceleration
  • ✅ Improved battery life

--mount-type=virtiofs (VirtioFS):

  • ✅ Fastest file I/O compared to 9p or sshfs
  • ✅ Better performance for bind mounts
  • ✅ Optimal for development workflows

Step-by-Step Migration

1. Check Your Current Setup

colima list

Look for profiles running with x86_64 architecture.

2. Stop Intel Emulation Profiles

colima stop <profile-name>
# Example: colima stop intel

3. Delete Old Profiles (if needed)

colima delete <profile-name>
# Example: colima delete default

4. Start with Optimal Configuration

colima start --vm-type=vz --mount-type=virtiofs --arch=aarch64 --cpu=4 --memory=4 --disk=60

5. Verify the Configuration

colima status

You should see:

  • arch: aarch64
  • macOS Virtualization.Framework
  • mountType: virtiofs

Performance Comparison

ConfigurationArchitecturePerformanceBattery Usage
Intel Emulationx86_64🐌 Slow🔋 High
Native ARM64aarch64⚡ Fast🔋 Low

Additional Optimizations

Memory and CPU Allocation

Adjust based on your system specs:

# For 16GB+ RAM systems
colima start --vm-type=vz --mount-type=virtiofs --cpu=6 --memory=8

# For 32GB+ RAM systems  
colima start --vm-type=vz --mount-type=virtiofs --cpu=8 --memory=12

Persistent Configuration

Create a config file at ~/.colima/default/colima.yaml:

vmType: vz
mountType: virtiofs
cpu: 4
memory: 4
disk: 60
arch: aarch64
runtime: docker

Troubleshooting

"Cannot Update VM Type" Error

If you get this error, you need to delete the existing profile:

colima delete default --force
colima start --vm-type=vz --mount-type=virtiofs

Docker Context Issues

Ensure Docker is using the correct context:

docker context ls
docker context use colima

Verification Test

Run this to confirm everything is working:

docker run --rm hello-world

The output should show (arm64v8) indicating native ARM64 images are being used.

Benefits You'll Notice

  • 🚀 Faster container startup times
  • Improved build performance
  • 🔋 Better battery life
  • 🏃‍♂️ Snappier development workflow
  • 💾 Lower memory usage

Conclusion

By switching to --vm-type=vz --mount-type=virtiofs, you're leveraging Apple's native virtualization technology for optimal Docker performance on Apple Silicon Macs. This simple change can dramatically improve your development experience.


System Requirements:

  • Apple Silicon Mac (M1, M2, M3, or newer)
  • macOS 13.0 (Ventura) or later
  • Colima 0.6.0 or later

Resources:

Happy coding! 🎉