Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk11 min

How to Use the Linux fuser Command

Use Linux fuser to identify processes using files, mounted filesystems, and TCP or UDP ports—then act safely with verbose checks, privilege awareness, and controlled signals.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

fuser tells you which process IDs are using a file, mounted filesystem, or network socket. Start with a read-only check such as fuser -v -u /path/to/file, interpret the access markers, and only then consider sending a signal. The same command can identify what is preventing an unmount, what owns a TCP or UDP port, or whether a device is available to a script.

What fuser does

The Linux fuser command displays the process IDs (PIDs) of processes using specified files or file systems. It can examine an ordinary pathname, the filesystem containing a pathname, or a TCP or UDP socket. Its return status is also useful: it is zero when at least one access is found, and non-zero when no named file is accessed or a fatal error occurs.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

That makes fuser a focused diagnostic tool for questions such as:

  • Which process has this log, database, or device open?
  • Why does an unmount say the target is busy?
  • Which process is listening on port 80 or 53?
  • Can a script treat a serial device as in use or available?

Identification and termination are separate operations. Commands without -k only report usage; they do not stop anything.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

Read the output before acting

A minimal invocation prints PIDs associated with the target. For an explanation that is useful to a person, use verbose and owner-aware output:

fuser -v -u /path/to/file

-v produces a ps-like report with columns such as PID, USER, COMMAND, and ACCESS. -u appends the process owner’s user name. This is normally the best first command because it shows who owns the process and how the resource is being used rather than leaving you with an unexplained number.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The ACCESS column uses one-letter markers:

Marker Meaning
c The process’s current directory is on the target.
e The target is the process’s executable.
f The process has an open file on the target. This is normally omitted unless verbose output is requested.
F The process has an open file for writing. This is normally omitted unless verbose output is requested.
r The target is the process’s root directory.
m The target is memory-mapped as a file or shared library.

A process can have more than one relationship with a target. For example, a service may have its current directory on a mounted filesystem and also have a writable file open there. Treat the marker as a clue about why the resource is busy, not as permission to kill the process.

A safe inspection workflow

1. Begin with one exact pathname

Quote paths containing spaces or shell metacharacters, then request a verbose, owner-aware report:

fuser -v -u -- /var/log/example.log

The -- separates options from the pathname. It is useful when a filename begins with a hyphen. If the command prints no process, that means no access was observed with the privileges and namespace available to your invocation; it is not proof that every process on the machine is unrelated.

2. Check several operands together

When investigating a group of paths, add -a:

fuser -av /path/to/file /another/path

Without -a, reporting normally focuses on operands for which access is found. -a includes every operand in the report, including an unused one, so you can distinguish “this path was checked and idle” from “this path was not shown because nothing was found.”

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.

3. Record the evidence

Write down the PID, user, command name, target, and access marker before changing anything. A PID can be reused after a process exits, so do not postpone action for an unrelated amount of time and then assume the number still identifies the same program. If the process is a service, use its normal service-management procedure after you have identified it; fuser is the discovery step.

Find processes using a mounted filesystem

To find users of an entire filesystem, use -m with a path located on that filesystem:

fuser -vm /mnt/data

-m reports processes accessing files on the filesystem containing the supplied name. The argument can therefore be a path within the mount, not only the mount directory itself. This is useful when an unmount reports that the device is busy and you need to discover open files, working directories, executables, or memory mappings anywhere on the mounted filesystem.

If you intend to inspect an existing mount point specifically, add -M:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
fuser -vmM /mnt/data

-M requires the operand to be a mount point. The Linux manual describes this check as an “invaluable seat belt” because it prevents an ordinary file from being interpreted as a filesystem target. Use it when a typo or an unexpectedly resolved path could otherwise broaden the search.

For a busy unmount, inspect first, identify every listed process, and determine whether each one can stop cleanly. A shell whose current directory is inside the mount, a daemon with a log open there, and a process with a mapped library all need different remedies. Closing the shell, changing its directory, stopping the owning service, or waiting for an operation to finish is safer than sending an indiscriminate kill signal.

Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by

Find the process using a TCP or UDP port

Select a socket namespace with -n tcp or -n udp:

fuser -v -n tcp 80
fuser -v -n udp 53

You may also use a service name where the system resolves one, or the compact form 80/tcp. By default, both IPv4 and IPv6 sockets are considered. Restrict the address family when the distinction matters:

fuser -v -4 -n tcp 80
fuser -v -6 -n tcp 80

This distinction explains an apparently contradictory result: a process may occupy the IPv6 socket while an IPv4-only query reports nothing, or the reverse. Run the unrestricted query first unless you have a reason to test one family.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use verbose output for a human investigation so that the PID, account, command, and access information are visible. If the result is empty, check the protocol, port number, address family, and your privileges before concluding that the port is unused. TCP and UDP lookups performed without sufficient privilege can report no access even when a socket exists.

Use fuser in scripts

For automation, suppress normal output with -s and use the exit status as the answer:

if fuser -s /dev/ttyS1; then
  echo "in use"
else
  echo "available"
fi

The conditional is true when at least one access is found. A false result covers both “no named file is accessed” and a fatal error, so scripts that must distinguish those cases should capture diagnostics separately rather than treating every non-zero status as proof of availability. In particular, permissions, namespace boundaries, an invalid operand, or another fatal condition can make an apparently unused resource look free.

Keep human-readable probing and machine decisions separate. Use -v and -u when an operator needs context; use -s when the only required result is a success or failure test. For multiple operands, decide whether the script needs a single aggregate status or a per-path result and invoke the command accordingly.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

Understand permissions and incomplete results

fuser cannot always see every process from an unprivileged account. The Linux manual warns that it may gather only partial information, including an inability to inspect other users’ file-descriptor tables. TCP and UDP lookups run without sufficient privilege can report no access. POSIX likewise allows systems to require appropriate privileges to invoke fuser.

When output is unexpectedly empty or incomplete:

  • Confirm the pathname, mount, protocol, and port are exactly the ones you intended.
  • Repeat the same read-only query through the least additional privilege allowed by your system policy, commonly an administrative account or an approved privilege wrapper.
  • Compare the privileged and unprivileged results. A difference indicates visibility, not necessarily a change in resource use.
  • Ask whether the target belongs to another mount namespace or container. A process visible in one namespace may not appear from another.

Do not grant broad privileges merely to obtain a prettier report. Start with the narrow inspection command, follow local authorization rules, and record which privilege level produced the result.

Mount namespaces and kernel accesses

Namespace boundaries affect what fuser can observe. Block devices mounted in another mount namespace may not be visible from your current namespace. Containerized workloads and service sandboxes can therefore make a host-side query appear empty even while the device is in use elsewhere.

Kernel accesses are shown only with -v. If a filesystem remains busy and a non-verbose query gives you no useful explanation, repeat it with verbose output before escalating. The kernel-related entry may be part of the reason a mount cannot be detached, and it will not be represented in the abbreviated form.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Stopping a process with -k

-k changes fuser from identification to signal delivery. Unless you select another signal, it sends SIGKILL. That signal does not give a process an opportunity to flush data, close files, release locks, or run cleanup handlers, so it is an administrative last resort rather than a diagnostic shortcut.

Use a two-stage procedure:

  1. Inspect the target and owners without killing anything:
    fuser -v -u /path/to/file
  2. After confirming that the listed process is understood and the interruption is acceptable, request confirmation and limit the action to writers if that is the actual goal:
    fuser -k -i -w /path/to/file

-i asks for confirmation before each action. -w limits the action to processes with write access. Together they narrow the chance of terminating a reader, shell, or unrelated process that merely shares the filesystem. If graceful shutdown is appropriate, select a different signal, such as TERM:

fuser -TERM -i -w /path/to/file

Use the same inspection-first discipline for mounts and sockets. Killing users of a mounted filesystem can interrupt services and data writes. Killing the owner of a listening port can drop active connections or trigger a supervisor to restart it. If a service has a documented stop or reload operation, prefer that operation after fuser has identified the process.

Be especially careful with broad operands such as an entire mount. A filesystem can contain many unrelated applications, and -k acts on the processes selected by the target and filters, not on your intention. Verify the exact path, namespace, access type, and signal before confirming.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common tasks at a glance

Question Command What to check
Who has one file open? fuser -v -u /path/to/file PID, USER, COMMAND, and ACCESS markers.
Show unused operands too fuser -av /path/to/file /another/path Every supplied path appears in the report.
Who is using a mounted filesystem? fuser -vm /mnt/data All accesses on the filesystem containing the path.
Require an actual mount point fuser -vmM /mnt/data The operand must be a mount point, not an ordinary file.
Who owns TCP port 80? fuser -v -n tcp 80 Both IPv4 and IPv6 by default.
Who owns UDP port 53? fuser -v -n udp 53 Use the correct protocol; restrict with -4 or -6 if needed.
Test a device quietly fuser -s /dev/ttyS1 Exit status rather than printed output.
Ask before stopping writers fuser -k -i -w /path/to/file Confirm each action and affect only writers.

Diagnose an unmount that says “busy”

Check the mount itself

Run fuser -vmM /mount/point so the query is tied to the intended mount point and includes verbose details. If you used a path inside the mount, compare it with fuser -vm /path/inside/mount; the latter follows the filesystem containing that path.

Classify each process

A c marker often means a shell or application is working from a directory on the mount. An f or F marker points to an open file, with uppercase F indicating writing. An m marker indicates a mapped file or shared library. Stop or relocate each workload using its normal procedure, then retry the unmount.

Recheck visibility

If nothing is listed, repeat the read-only command with appropriate privileges and consider whether the mount exists in another namespace. Only after the cause is understood should you evaluate a signal, and SIGKILL should not be the default response to a busy mount.

Diagnose a port conflict

Verify protocol and family

Run the TCP and UDP forms separately; port numbers are not interchangeable across protocols. If an application binds only one address family, compare the default query with explicit -4 and -6 queries.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Identify the owning command

Use -v and, where permitted, -u to associate the PID with an account and command. If the command is not visible, treat that as a privilege or namespace question first.

Choose a controlled remedy

For a managed service, stop or reconfigure it through its service controls. If a one-off process must be signaled, inspect again immediately before using a specific signal. Avoid killing a PID copied from an old report after the process may have exited and the number may have been reused.

fuser compared with neighboring tools

fuser is convenient when the question is “which PIDs are associated with this exact file, filesystem, or socket?” Its access markers and exit status also make it useful for quick checks and shell conditionals. Other Unix tools can provide different views: lsof is commonly used for detailed open-file listings, while ss is commonly used for socket state and listening information. Their options and output are not specified here, so choose them when you need their particular view rather than assuming they behave identically to fuser.

Decision Start with Reason
One file or mount is busy fuser Direct target-based PID lookup with filesystem access markers.
A script only needs “in use?” fuser -s Exit status avoids parsing human-oriented output.
A port owner is unknown fuser -n tcp or -n udp Protocol-specific PID lookup, with IPv4/IPv6 controls.
You need a broader open-file inventory A tool such as lsof Use its own documented output and privilege model; do not assume equivalence.
You need socket-state detail A tool such as ss Use its own documented options for connection and listening state.

Troubleshooting checklist

  • No output for a file: confirm the path, add -v -u, and retry with appropriate privileges.
  • A port appears free when it is not: verify -n tcp versus -n udp, test the needed address family, and check visibility restrictions.
  • A mount remains busy: use -vmM, inspect c, f, F, and m markers, then account for other mount namespaces.
  • An ordinary file was treated as a filesystem: add -M when the intent is specifically a mount point.
  • A script reports “available” unexpectedly: remember that a non-zero status also covers errors and incomplete visibility; preserve diagnostics and check privileges.
  • You are tempted to add -k immediately: remove it, perform a verbose owner-aware inspection, and decide on a graceful service action or a narrowly selected signal.

A compact operational checklist

  1. State the target precisely: pathname, mount point, TCP port, or UDP port.
  2. Run a read-only query first, normally with -v; add -u when ownership matters.
  3. Use -a when you need unused operands shown, -m for a filesystem, and -M to require a mount point.
  4. For sockets, choose -n tcp or -n udp and check IPv4/IPv6 scope.
  5. Interpret the access marker and verify the PID, user, command, namespace, and privilege level.
  6. For automation, use -s and handle non-zero status as “not confirmed in use,” not automatically “safe.”
  7. Only after the process is understood, consider a normal service stop or a narrowly scoped signal. Treat default -k behavior, SIGKILL, as a last resort.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.