3 examples for update-alternatives
# Installing java alternatives. # Arguments are update-alternatives link name path priority # link = the generic link which should be managed by alternatives. # name = the name of the alternative same as the link in created in the alternatives folder(/etc/alternatives/) # path = the alternative path the alternative should point to sudo update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/jdk1.7.0_45/jre/bin/java" 1
# Add a new alternative for an already installed program. Identical syntax to adding a new one, # just provide the path to the other alternative as the second-to-last argument, with a different priority number. sudo update-alternatives --install "/usr/bin/java" "java" "/usr/local/my-other-jdk/java" 2
# Select default browser interactively from list of possibilities update-alternatives --config x-www-browser