I have a vmware-install.pl file that I need to execute. I double click it but Linux will open it in a text editor for editing. How to execute this file? Can it be done from GUI?
In file's properties says "allow executing file as program".

I have Fedora 18.

I managed to open the console and navigated to my folder. I have poked:

chmod +x vmware-install.pl

the last line says:

vmware-install.pl command not found...

but 'ls' lists the file there....


Run this instead:


The ./ refers to the current directory.

If you run it without ./, Linux will look for a program called vmware-install.pl in your executable path, but the current directory is never in the path by default (for security reasons).

  • 1
    It says: usr/bin/perl: bad interpreter: no such file or directory. – Gravity Sep 4 '14 at 10:13
  • Make sure that the first line in the file is #!/usr/bin/perl and not #!usr/bin/perl -- in case you edited the file accidentally. – slhck Sep 4 '14 at 10:16
  • no. I didn't touch the file – Gravity Sep 4 '14 at 10:17
  • I checked inside the file. the first line is: #!/usr/bin/perl -w – Gravity Sep 4 '14 at 10:19
  • Accepted. Continued here: superuser.com/questions/807162/perl-not-found – Gravity Sep 4 '14 at 10:32

"How to execute a PL file in Linux?"

A PL file in Linux (filename ending with .pl) is very likely a Perl-program. So run it with perl like this:

perl vmware-install.pl

It's often also possible to just:

./vmware-install.pl        #or:

But this requires the execution bit (a chmod +x attribute) to be set on vmware-install.pl and also Perl must be installed on your Linux where the first line says (head -1 vmware-install.pl). If perl vmware-install.pl doesn't work, there might be two explanations for that: 1) your system don't have perl installed (unlikely on linux) or 2) perl is not installed in any of the folders in the $PATH environment variable. Try:

echo $PATH
perl vmware-install.pl
/usr/bin/perl vmware-install.pl
/usr/local/bin/perl vmware-install.pl
/whereever/your/system/has/perl vmware-install.pl
sudo yum install perl        #to install perl on Redhat, RHEL, CentOS etc
sudo apt-get install perl    #to install perl on Ubuntu, etc

From the GUI:

  1. Right-click on the folder and click "Open in Terminal"
  2. Type ./vmware-install.pl
  • I don't have this option in the pop-up menu. – Gravity Sep 4 '14 at 9:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.