Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to execute a command from a single link?

For example when a user clicks on a link it does this:

sudo apt-get install vlc wine openshot but by clicking on a link

share|improve this question
up vote 2 down vote accepted

Your particular example is possible via the apt-uris:

This will open wine in the software centre, giving the user the option to install it.

Running arbitrary commands on any Ubuntu machine is (hopefully) never possible:

share|improve this answer
I think I'm right in saying that is the preferred way of linking packages. The AptUrl wiki page is rather old :-) – Stefano Palazzo Jun 9 '11 at 15:24
What about the answer I posted above. Does it work for multiple programs or not since i took it from the Wiki about AptUrl. – Luis Alvarado Jun 9 '11 at 15:25
Just read your answer. what about an example of installing multiple programs. – Luis Alvarado Jun 9 '11 at 15:26
Installing multiple programs with one click doesn't work with this syntax I don't think – Stefano Palazzo Jun 9 '11 at 15:32

Lol found it thanks to Oli's post here Is it possible to install a repository via a web (Clicking in a webpage link)

It is possible to install multiple packages. In this wiki all the possible actions can be found. To install one would be like this:

<a href="apt:package">click</a> 

For example:

<a href="apt:vlc">click</a> 

This would install vlc.

But lets say you want to install VLC, Ubuntu Extras and subdownloader:

<a href="apt:vlc,ubuntu-restricted-extras,subdownloader">click</a> 

Each separated by a comma. Awesome.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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