Questions tagged [update-alternatives]
137 questions
148
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,163
93
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
- 2,065
34
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…
24
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
- 343
22
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
21
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
- 739
20
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
- 552
15
votes
6 answers
Can I go back to python3.10 on Ubuntu 24.04?
I updated my Ubuntu from 22.04 to 24.04
Previously python 3.10 was getting used
Now the default version is python3.12
Python 3.12 seems to call for virtual environment usage, Have been going through some documentation and forums, but was thinking…
Meenohara
- 263
- 1
- 3
- 9
13
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,410
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
13
votes
2 answers
How to properly install Temurin JDK with update-alternatives
I wanted to install Temurin JDK both 8 and 11, I installed them by these steps
wget https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u312-b07/OpenJDK8U-jdk_x64_linux_hotspot_8u312b07.tar.gz
tar xzf…
poqdavid
- 277
13
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
- 425
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
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
- 885