Update-alternatives command

Source: Internet
Author: User

Update-alternatives command 1. Functions

Update-alternatives is a dpkg utility used to maintain symbolic links of system commands to determine which commands are used by default.

In the Debian system, we may install many similar programs and optional configurations at the same time, such as the web browser program (Firefox, Konqueror), Window Manager (wmaker, metacity) different theme from that of the mouse. In this way, users can choose to use the system to meet their own needs.

However, it is difficult for common users to select and configure between these programs. The update-alternatives tool is designed to solve this problem and help users easily select their preferred programs and configure system functions.

2. Location

/Usr/bin/update-Alternatives

3. Format usage

Update-alternatives [<option>...] <command>

4. Main Parameters

 

123456789101112131415161718192021222324252627282930313233343536 Commands: -- install <link> <Name> <path> <priority> [-- slave <link> <Name> <path>]... add a group of replacement items to the system. -- remove <Name> <path> Removes <path> items from the <Name> replacement group. -- remove-all <Name> Delete <Name> replacement group from the replacement system. -- Auto <Name> switches the master link of <Name> to automatic mode. -- display <Name> displays information about the <Name> replacement group. -- Query <Name> machine parseable version of -- display <Name>. -- list <Name> List <Name> replace all available replicas in the group. -- Get-selections list master alternative names and their status. -- Set-selections read alternative status from standard input. -- config <Name> lists the options in the <Name> replace group, and asks the user for advice on which option is used. -- set <Name> <path> to replace <path> with <Name>. -- All calls the -- config command for all options. <link> is a symbolic link to/etc/alternatives/<Name>. (e.g. /usr/bin/pager) <Name> is the Master name of The Link replacement group. (e.g. PAGER) <path> is the position of the object to be replaced. (e.g. /usr/bin/less) <priority> is an integer. The higher the value, the higher the priority. options: -- altdir <directory> specifies different optional directories. -- admindir <directory> specifies different management directories. -- log <File> sets the log file. -- force allow replacing files with alternative links. -- skip-auto skip prompt for Alternatives correctly configured in automatic mode (relevant for -- Config Only) -- verbose detailed operation information, more output. -- Quiet quiet mode: outputs as little information as possible. -- help: displays the help information. -- version: displays version information.

 

5. Application Instance

1. List available candidate commands
Update-alternatives -- list Java

2. Display and modify the candidate commands actually pointed,
Sudo Update-alternatives -- config Java

3. configure all candidate commands on the System
Sudo Update-alternatives -- all

4. Display All optional commands for a command link
Update-alternatives -- Display Editor

5. Switch the master link of <Name> to automatic mode.
Sudo Update-alternatives -- Auto Editor

6. Add a set of replacement items to the System
Sudo Update-alternatives -- install x-cursor-theme X-cursor-Theme/etc/X11/cursors/gold. Theme 70

 

From: http://www.lampblog.net/ubuntu/update-alternatives%E5%91%BD%E4%BB%A4/

 

 

Update-alternatives command

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.