💻 Software
Run a shell script with an html button
Fresh5 days ago
Mar 15, 2026161598 viewsConfidence Score0%
0%
Problem
I want to launch a bash script when a button is pressed on a website. This is my first attempt: But no luck. Any suggestions? EDIT- Following slhclk's and mit's advice: I have a php file in /var/www that I point my web-browser to. The contents of the file is as follows: tesh.sh contains this: If I …
Error Output
<button type="button" onclick="/path/to/name.sh">Click Me!</button>
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: Run a shell script with an html button
Low Risk
What you are trying to do is not possible that way. Note that there are always two sides to that: The client side and the server side. Is the script on the client computer or on the server? If it's on the client: You as the visitor are only seeing a…
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix