Update cheatsheets

This commit is contained in:
ivuorinen
2024-02-21 11:19:49 +00:00
parent 4e88a1b42f
commit 3d653cc7e6
4803 changed files with 127002 additions and 0 deletions

29
linux/update-alternatives Normal file
View File

@@ -0,0 +1,29 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# update-alternatives
> A convenient tool for maintaining symbolic links to determine default commands.
> More information: <https://manned.org/update-alternatives>.
- Add a symbolic link:
`sudo update-alternatives --install {{path/to/symlink}} {{command_name}} {{path/to/command_binary}} {{priority}}`
- Configure a symbolic link for `java`:
`sudo update-alternatives --config {{java}}`
- Remove a symbolic link:
`sudo update-alternatives --remove {{java}} {{/opt/java/jdk1.8.0_102/bin/java}}`
- Display information about a specified command:
`update-alternatives --display {{java}}`
- Display all commands and their current selection:
`update-alternatives --get-selections`