LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-22-2014, 09:04 PM   #1
mcresist
LQ Newbie
 
Registered: Jun 2014
Location: Michigian
Distribution: CentOS5/6/7
Posts: 19

Rep: Reputation: 3
CentOS 6 - 'alternatives' command


Hello LQ,

I recently ran into the 'alternatives' command ( /usr/sbin/alternatives ). It helped me through a migration from Oracle Java ( ) to openjdk ( ).

I've read through the man page, and have an understanding of what the program is designed to do. However, I can't decide if this command is actually something I should lean on regularly. Sure, it helped me through a sticky situation with Oracle V. OpenJDK, but I'm curious if this command is "recommended".

Anybody have any thoughts on that command?
 
Old 07-22-2014, 11:35 PM   #2
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by mcresist View Post
Hello LQ,

I recently ran into the 'alternatives' command ( /usr/sbin/alternatives ). It helped me through a migration from Oracle Java ( ) to openjdk ( ).

I've read through the man page, and have an understanding of what the program is designed to do. However, I can't decide if this command is actually something I should lean on regularly. Sure, it helped me through a sticky situation with Oracle V. OpenJDK, but I'm curious if this command is "recommended".

Anybody have any thoughts on that command?
I have not used this command but normally something which has helped you out and comes with a default distro can be trusted and be used as any other command.
 
1 members found this post helpful.
Old 07-23-2014, 01:01 AM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,623

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
years ago in the PRE "alternatives" days there was a problem
A really BIG PROBLEM .

one that was normally fixed by using scripts to set the "DEFAULT" version of a program if more that one version is installed
like
gcc 3.3
gcc 4.1
gcc 4.3
gcc 4.9

Oracle java
OpenJDK

libpng 14
libpng 12

Python 2.7
Python 3.3

so alternatives got created TO FIX that issue


now some of us still use bash scripts to reset these
but alternatives is there to do that
 
1 members found this post helpful.
Old 07-23-2014, 07:19 AM   #4
grim76
Member
 
Registered: Jun 2007
Distribution: Debian, SLES, Ubuntu
Posts: 308

Rep: Reputation: 50
Alternatives is a great tool. I use it to make upgrades to Java on our production systems. The Dev folks point to the same location every time regardless of the java version or the directory structure.
 
1 members found this post helpful.
Old 07-23-2014, 10:01 AM   #5
mcresist
LQ Newbie
 
Registered: Jun 2014
Location: Michigian
Distribution: CentOS5/6/7
Posts: 19

Original Poster
Rep: Reputation: 3
Thanks for all the input.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Alternatives to lsdev on CentOS/Ubuntu DrTek Linux - Newbie 5 10-15-2013 02:01 AM
[SOLVED] The mount --bind command - alternatives? Restless86 Linux - General 2 02-07-2011 10:58 AM
alternatives for the ulimit command basher400 Linux - General 5 05-30-2010 08:20 AM
RHEL MRG alternatives for CentOS zcrxsir88 Linux - Enterprise 4 03-03-2010 04:59 PM
alternatives command not working timb5163 Mandriva 6 11-20-2005 05:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration