alias gpg gpp2
alias gpg="gpg2"
update-alternatives
is Debian tool.Yampress : and that's precisely the reason why I asked for an equivalent.
lebarondemerde : Thank's for the hint. The man pages told me to do the following:
That did the trickCode:alias gpg="gpg2"
[yampress@debian /etc/alternatives]$ ls -al
razem 52
drwxr-xr-x 2 root root 4096 wrz 9 08:04 .
drwxr-xr-x 138 root root 12288 wrz 17 10:28 ..
lrwxrwxrwx 1 root root 20 sie 10 16:23 animate -> /usr/bin/animate-im6
lrwxrwxrwx 1 root root 36 sie 10 16:23 animate.1.gz -> /usr/share/man/man1/animate-im6.1.gz
lrwxrwxrwx 1 root root 13 sie 10 16:36 awk -> /usr/bin/gawk
lrwxrwxrwx 1 root root 29 sie 10 16:36 awk.1.gz -> /usr/share/man/man1/gawk.1.gz
lrwxrwxrwx 1 root root 38 sie 10 15:00 builtins.7.gz -> /usr/share/man/man7/bash-builtins.7.gz
lrwxrwxrwx 1 root root 16 sie 10 16:22 c89 -> /usr/bin/c89-gcc
lrwxrwxrwx 1 root root 32 sie 10 16:22 c89.1.gz -> /usr/share/man/man1/c89-gcc.1.gz
lrwxrwxrwx 1 root root 16 sie 10 16:22 c99 -> /usr/bin/c99-gcc
lrwxrwxrwx 1 root root 32 sie 10 16:22 c99.1.gz -> /usr/share/man/man1/c99-gcc.1.gz
lrwxrwxrwx 1 root root 12 sie 10 16:22 cc -> /usr/bin/gcc
lrwxrwxrwx 1 root root 13 sie 10 16:23 cli -> /usr/bin/mono
....
lrwxrwxrwx 1 root root 17 sie 10 15:01 w -> /usr/bin/w.procps
lrwxrwxrwx 1 root root 33 sie 10 15:01 w.1.gz -> /usr/share/man/man1/w.procps.1.gz
lrwxrwxrwx 1 root root 18 sie 10 15:01 write -> /usr/bin/bsd-write
lrwxrwxrwx 1 root root 34 sie 10 15:01 write.1.gz -> /usr/share/man/man1/bsd-write.1.gz
lrwxrwxrwx 1 root root 39 sie 10 17:02 x-cursor-theme -> /usr/share/icons/DMZ-White/cursor.theme
lrwxrwxrwx 1 root root 17 sie 10 16:23 x-session-manager -> /usr/bin/startkde
lrwxrwxrwx 1 root root 16 sie 10 16:23 x-terminal-emulator -> /usr/bin/konsole
lrwxrwxrwx 1 root root 17 sie 10 16:23 x-window-manager -> /usr/bin/kwin_x11
lrwxrwxrwx 1 root root 23 sie 10 16:33 x-www-browser -> /usr/bin/vivaldi-stable
[yampress@debian /etc/alternatives]$
ln -s /usr/bin/vivaldi-stable /etc/alternatives/x-www-browser
Not really. Shell aliases are local to your shell only. Scripts and other shells won't see it. Using a symlink or wrapper script makesalias in FreeBSD is easier and It's similar way to do the same action.
gpg
available globally. ln -s /usr/local/bin/gpg2 /usr/local/bin/gpg
(or link to somewhere else in your PATH if you don't want to touch /usr/local/bin)sudo update-alternatives --install /usr/local/bin/gcc gcc /usr/local/bin/gcc15 100 \
--slave /usr/local/bin/g++ g++ /usr/local/bin/g++15 \
--slave /usr/local/bin/gfortran gfortran /usr/local/bin/gfortran15 \
--slave /usr/local/bin/gcc-ar gcc-ar /usr/local/bin/gcc-ar15 \
--slave /usr/local/bin/gcc-nm gcc-nm /usr/local/bin/gcc-nm15 \
--slave /usr/local/bin/gcc-ranlib gcc-ranlib /usr/local/bin/gcc-ranlib15 \
--slave /usr/local/bin/gcov gcov /usr/local/bin/gcov15
sudo update-alternatives --config gcc