# Adding Permanent alias using update-alternatives

```bash
sudo update-alternatives --install [target_path] [alternative_name] [source_path] [priority]
```

* alternative\_name -&gt; name for managing alternative
    
* target\_path -&gt; usuall /usr/bin/{alternative\_name} (if you want to use same command as alternative\_name)
    
* source\_path -&gt; source path of binary you can use `$(which COMMAND)`
    
* priority -&gt; priority number for alternative (useful when multiple alternatives for one)
    

# Example:

```bash
sudo update-alternatives --install /usr/bin/python python $(which python3) 10
```

* /usr/bin/python -&gt; target
    
* python -&gt; Alternative name
    
* $(which python3) -&gt; gives the source for python 3
    
* 10 -&gt; Priority
