User & Group Management
Force users off their home directories when they just wont log out
🧩 The Challenge
Dealing with a user account that has an open handle on a mount point is a headache, especially when you need to unmount a drive for maintenance and the system claims the device is busy. I have spent way too long hunting for PID numbers manually while an angry dev waits for their environment to come back up.
💡 The Fix
You can use a specific utility to send a kill signal to every single process currently accessing a directory, which clears the way instantly. It saves you from manually Grepping through lsof output for ten minutes.
fuser -k -i -m /home/username
⚙️ Why It Works
This command locates any process using the specified mount point and signals them to terminate before you run your unmount. The -i flag is there for safety, so it asks you to confirm each kill before it goes nuclear on their session.
🚀 Pro-Tip: Use the -v flag first if you want to see exactly what is hogging your resources without killing anything yet.
Linux Tips & Tricks | © ngelinux.com | 9/20/2026
