Adding Permanent alias using update-alternatives
sudo update-alternatives --install [target_path] [alternative_name] [source_path] [priority]
alternative_name -> name for managing alternative
target_path -> usuall /usr/bin/{alternative_name} (if you want to use same command as alternative_name)
source_path -> source path of binary you can use
$(which COMMAND)priority -> priority number for alternative (useful when multiple alternatives for one)
Example:
sudo update-alternatives --install /usr/bin/python python $(which python3) 10
/usr/bin/python -> target
python -> Alternative name
$(which python3) -> gives the source for python 3
10 -> Priority

![Troubleshooting [zsh: Corrupt History File]: A Simple Guide for Windows, Linux, macOS](/_next/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fstock%2Funsplash%2FxbEVM6oJ1Fs%2Fupload%2F160b183e50d491e945ca5ecb02f01896.jpeg&w=3840&q=75)


