82
Learn "fuser", a little-known Linux workhorse command!
vid.puffyan.usEver want to eject a flash drive but you can't because the device claims that it's "busy"?
In today's Lil' Linux Lesson, we dive into the fuser command! The fuser command is one of those Linux utilities that you don't realize you need, but once you learn it, you'll find you're using it all of the time.
This video isn't sponsored by anyone other than you. To help me keep it that way, please support if you can. Thank you so much!
🖖 Support the channel: https://patreon.com/VeronicaExplains
☕ ...or via Ko-Fi: https://ko-fi.com/VeronicaExplains
👕 ...or buy a shirt from my website: https://vkc.sh/merch
📑 Common UNIX Specification: https://pubs.opengroup.org/onlinepubs/009639599/toc.pdf
📺 The recent @LearnLinuxTV video on the lsof command: https://www.youtube.com/watch?v=n9nZ1ellaV0
Chapters and such:
0:00 What is the fuser command?
1:07 Examples of the fuser command
1:46 Basic usage of fuser in Linux
2:58 Using the info from the fuser command
4:15 Working with mount points or block devices with fuser
4:51 Working with TCP ports with fuser
5:46 Learning more about fuser (and about Linux)
6:20 "What I'm Watching": LearnLinuxTV's lsof video
#linux #homelab #terminal
And what do you do when neither fuser not lsof return any results? Every single time I’ve had something stuck that refused to umount, I have gotten no help from either of these tools. One recent example was mounting a drive image as a loop device, modifying /etc/fstab, backing out of the mounted device so I could umount it… and it completely refused.
umount -l
usually works for meTrue, but it leaves things behind that can get in way when you go to mount other resources in the same folder. On my desktop I just reboot to clear things up, but on my servers it is usually months between reboots and I have to schedule it.