–
PC: oS 11.4 (dual boot 12.1) 64 bit | Intel Core i7-2600@3.40GHz | KDE
4.6.0 | GeForce GT 420 | 16GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.8.0 |
nVidia ION | 3GB Ram
Sorry i missed something, the command has no -h switch, what are you
trying to do?
–
PC: oS 11.4 (dual boot 12.1) 64 bit | Intel Core i7-2600@3.40GHz | KDE
4.6.0 | GeForce GT 420 | 16GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.8.0 |
nVidia ION | 3GB Ram
Also, in windows there is what is called a “PATH” environment variable, you add the location of the app you want so that it can be ran on the command prompt
is this possible on linux?
if yes, how do I set this up? ex. this update-alternative, add this to the path variable to be ran directly to the command prompt
On 2012-02-10 21:16, Jomar808 wrote:
>
> Also, in windows there is what is called a “PATH” environment variable,
> you add the location of the app you want so that it can be ran on the
> command prompt
> is this possible on linux?
Of course.
> if yes, how do I set this up? ex. this update-alternative, add this to
> the path variable to be ran directly to the command prompt
The path is correctly set, don’t change it.
Simply, when you use sudo you are not yet root, so you have the path as
correct for a plain user, not for root.
If you get yourself root first, it works:
su -
–
Cheers / Saludos,
Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)
–
PC: oS 11.4 (dual boot 12.1) 64 bit | Intel Core i7-2600@3.40GHz | KDE
4.6.0 | GeForce GT 420 | 16GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.8.0 |
nVidia ION | 3GB Ram
On 02/10/2012 07:26 PM, Jomar808 wrote:
> sudo update-alternatives -h
NO! that page on google NOWHERE says to use “sudo update-alternatives”
nor does it say you can get help by using “sudo update-alternatives -h”
you must be precise!
evidently you have been exposed to Ubuntu which is NOT openSUSE… in
Ubuntu they never use root and always use sudo…don’t do that here…
the command “update-alternatives” is given by root as
su -
update-alternatives
exit
if you wish to add the help flag, do it the same way…but, MUCH more
info on update-alternatives is available from its manual or help, thus:
su -
man update-alternatives
info update-alternatives
actually, i’m not sure if one must be root to read the man and info for
a root only command…i can read them on my machine as a normal user, so
try it that way first…
On 2012-02-11 16:40, DenverD wrote:
> actually, i’m not sure if one must be root to read the man and info for a
> root only command…i can read them on my machine as a normal user, so try
> it that way first…
Information can be restricted, but to what point? You can have some manual
pages readable only by root, but you can install the same system at home
and read them, or even on internet. It is useless to restrict access to man
pages.
–
Cheers / Saludos,
Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)
You don’t need to be root to read the MAN pages (and specifically update-alternatives).
Also, newbies should know that the convention in openSUSE is to use double-hyphens, eg
$ update-alternatives --help
BTW - Here is a mini-FAQ based on my personal use of update-alternatives…
It’s very rare when someone should need to setup an update-alternatives entry, more typically anytime a new option is installed properly into openSUSE, update-alternatives will be setup automatically for the User to switch between options.
So, for me the most common use is to switch between various Java. Today, there is still some software that requires Sun Java SE 1.5, openJDK 1.6 is installed by default, and for various reasons you may need to have both JDK as well as JRE packages available on a system.
Because JAVA is one of the groups supported by update-alternatives, all you need to do is install the packages from both Sun/Oracle and the openSUSE repos you wish, and with the following command you can switch between any of them
$ update-alternatives --config java
Cool, huh?
The other command you might find useful is to list the various groups supported by update-alternatives