Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
17
rated 0 times [  17] [ 0]  / answers: 1 / hits: 59569  / 2 Years ago, thu, january 27, 2022, 6:22:36

I'm trying to install VMware Workstation in my Ubuntu 12.04.2 LTS.
If I execute the following command:



sudo ./VMware-Workstation-9.0.1-894247.x86_64.bundle


it finishes at once and the installation never starts.



If I execute this command:



sudo sh ./VMware-Workstation-9.0.1-894247.x86_64.bundle


The installer can be launched successfully.



Why does this make a difference?


More From » sudo

 Answers
6

If the file is not marked as executable you need to call a command shell interpreter to execute it.



Examples:




  • sudo sh foo will open foo with sh using sudo privileges.


  • sudo bash foo will open foo with bash using sudo privileges.


  • sh foo will open foo with sh using your user's privileges.


  • bash foo will open foo with bash using your user's privileges.




If you mark a file as executable you just need to call it with ./foo and because it is marked as such it will be read with the defined command shell interpreter and executed without the need to define one.



ls -F will list files and mark executables with *.



To enable the execute bit on a file (and make it executable as such) use the command chmod +x foo.



In your case to make the file you are using executable you would then use the command



chmod +x VMware-Workstation-9.0.1-894247.x86_64.bundle



and then you will be able to run it with either



sudo sh ./VMware-Workstation-9.0.1-894247.x86_64.bundle or just by typing sudo ./VMware-Workstation-9.0.1-894247.x86_64.bundle.


[#31803] Saturday, January 29, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tiowift

Total Points: 119
Total Questions: 113
Total Answers: 110

Location: South Sudan
Member since Sun, Jul 11, 2021
3 Years ago
tiowift questions
Wed, Aug 3, 22, 04:45, 2 Years ago
Mon, Nov 7, 22, 10:58, 2 Years ago
Wed, May 10, 23, 17:52, 1 Year ago
;