FG
💻 Software

why ./ is needed to run a runnable file?

Fresh5 days ago
Mar 15, 20261200 views
Confidence Score0%
0%

Problem

I'm using ubuntu and I notice many of my runnable scripts won't run unless I precede theme by . For example, if I have a perl script: and I'm currently in , typing won't do it, but will. Why is that?

Error Output

./

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: why ./ is needed to run a runnable file?

Low Risk

Because the current directory is not in your path. This is a safety feature. If it was in your path, someone could potentially drop a malicious copy of a common command, and when you are in that directory instead of running the real sudo, for exampl…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment