Questions tagged [update-alternatives]

134 questions
140
votes
4 answers

What exactly does `update-alternatives` do?

What is the command update-alternatives used for? Take this example: sudo update-alternatives --install /usr/bin/java java /usr/local/java/jre1.7.0_09/bin/java 1 What does it do? How is it different from adding jdk to the path? Let's say that I…
Developer Android
  • 2,063
  • 5
  • 20
  • 20
87
votes
1 answer

What are the differences between vim.basic and vim.tiny?

My favorite editor is Vim, so I decided to change the default editor of my ubuntu installation with the following command: sudo update-alternatives --config editor A prompt (with listed options) came up asking for an editor, but I noticed that it…
talles
  • 1,955
  • 2
  • 14
  • 14
32
votes
2 answers

How to inspect the currently used Nvidia driver version and switch it to another alternative?

I'm trying to find out which Nvidia driver is being used currently in the system (and how to perhaps switch it to another version or the open-source nouveau driver). modinfo knows about several nvidia drivers installed in the system (nvidia_173 and…
25
votes
2 answers

Undo update-alternatives

I had to run the command sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 20, but unfortunately I misstyped and wrote sudo update-alternatives --install /usr/bin/gcc gccc /usr/bin/gcc-4.8 20 (so gccc instead of gcc). Now, when…
jdepypere
  • 353
  • 1
  • 3
  • 6
21
votes
1 answer

What's the difference between x-www-browser and gnome-www-browser?

What's the difference between x-www-browser and gnome-www-browser? I came across it here: Setting the default browser when update-alternatives fails.
user25656
17
votes
3 answers

Set clang-3.8 as default

I have installed clang 3.0 and clang 3.8: $ sudo update-alternatives --config clang update-alternatives: error: no alternatives for clang. How can I set 3.8 as /usr/bin/clang?
Andrew
  • 649
  • 1
  • 5
  • 11
17
votes
2 answers

Java 11 to 8: update-alternatives: error: no alternatives for mozilla-javaplugin.so

I have Java 11 and 8 in my Ubuntu 18.04, side by side. I mean to set Java 8 as the default. What I get: $ sudo update-java-alternatives --set /usr/lib/jvm/java-1.8.0-openjdk-amd64 update-alternatives: error: no alternatives for…
16
votes
3 answers

Set emacs -nw as default editor

When editing files like sudoers, I want to use emacs instead of nano. So I ran this command sudo update-alternatives --config editor And I selected emacs. The only issue is I like emacs in no window mode (the -nw flag) and I've aliased emacs as…
gsgx
  • 512
  • 4
  • 8
  • 15
13
votes
1 answer

java alternatives - Change auto mode

I have three JDKs installed, all needed for some projects I work on. When I run sudo update-alternatives --config java I get the output: There are 3 choices for the alternative java (providing /usr/bin/java). Selection Path …
stefano
  • 293
  • 1
  • 2
  • 8
12
votes
2 answers

apt-get update for ubuntu 10.04

I know that Ubuntu 10.04 is no longer supported. But I am still using it, becuase I use virtual machine (VirtualBox), and on previous trials to use any more updated Ubuntu version was too heavy, and slow, in my machine. Now, when I try…
ransh
  • 313
  • 1
  • 4
  • 12
12
votes
1 answer

How to use multiple instances of gcc?

I have both gcc 4.7.3 and 4.8.1 installed But on running gcc --version I get gcc (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3 Copyright (C) 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO…
sud_the_devil
  • 855
  • 6
  • 12
  • 19
11
votes
3 answers

update-alternatives: "alternative path doesn't exist" issue while updating JDK7

I decided to update my JDK7 to recent version from here. Corresponding x64 tag.gz archive for my architecture has been downloaded and extracted to /usr/lib/jvm as usual. All previous versions of Java were installed before the same way. But before…
ezze
  • 790
  • 2
  • 10
  • 21
10
votes
3 answers

How can I add my desired editor to the "update-alternatives" interactive menu?

Ive just installed ubuntu 16.04.2 32 bit on a digital ocean server. Digital ocean has tweaked the ubuntu install a bit, for example they have installed full vim as part of the block image they use in their VPS's. I now want to use this -…
the_velour_fog
  • 2,290
  • 5
  • 23
  • 34
10
votes
1 answer

`update-alternatives --list editor` does not show editors installed via `snap`

$ update-alternatives --list editor /bin/nano /usr/bin/code /usr/bin/vim.tiny update-alternatives --list editor does not show nvim which I installed using snap. Even though my PATH variable contains /snap/bin. How do I fix this?
Akash Karnatak
  • 385
  • 4
  • 17
9
votes
2 answers

how to use "update-alternatives" to manage multiple installed version of the same app

I frequently encounter path related problems while compiling or running an app.I have two versions of node in my system, one is from official repo, the other manually installed from source. Today I wanted to compile brackets, when I run npm install…
kenn
  • 5,074
  • 12
  • 55
  • 94
1
2 3
8 9