Não são links físicos, mas links simbólicos / suaves:
$ stat /etc/alternatives/default.plymouth
File: ‘/etc/alternatives/default.plymouth’ -> ‘/lib/plymouth/themes/ubuntu-logo/ubuntu-logo-scale-2.plymouth’
Size: 61 Blocks: 8 IO Block: 4096 symbolic link
Device: 801h/2049d Inode: 174731 Links: 1
Access: (0777/lrwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root)
(Isso controla o tema mostrado durante a inicialização.)
update-alternatives
usa o unlink
e symlink
chamadas do sistema:
$ sudo strace update-alternatives --config default.plymouth
execve("/usr/bin/update-alternatives", ["update-alternatives", "--config", "default.plymouth"], [/* 18 vars */]) = 0
brk(0) = 0x18c3000
...
write(1, "Press enter to keep the current "..., 69Press enter to keep the current choice[*], or type selection number: ) = 69
fstat(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 17), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8d4c8a2000
read(0, 1
"1\n", 1024)
...
unlink("/etc/alternatives/default.plymouth.dpkg-tmp") = -1 ENOENT (No such file or directory)
symlink("/lib/plymouth/themes/ubuntu-logo/ubuntu-logo-scale-2.plymouth", "/etc/alternatives/default.plymouth.dpkg-tmp") = 0
lstat("/lib/plymouth/themes/default.plymouth", {st_mode=S_IFLNK|0777, st_size=34, ...}) = 0
lstat("/lib/plymouth/themes/default.plymouth", {st_mode=S_IFLNK|0777, st_size=34, ...}) = 0
readlink("/lib/plymouth/themes/default.plymouth", "/etc/alternatives/default.plymou"..., 34) = 34
stat("/lib/plymouth/themes/ubuntu-logo/ubuntu-logo.grub", {st_mode=S_IFREG|0644, st_size=47, ...}) = 0
unlink("/etc/alternatives/default.plymouth.grub.dpkg-tmp") = -1 ENOENT (No such file or directory)
symlink("/lib/plymouth/themes/ubuntu-logo/ubuntu-logo.grub",
...
exit_group(0) = ?
+++ exited with 0 +++
As alternativas são todas ligações realmente simbólicas, IIRC. Você poderia ligá-los manualmente, se desejar. O que update-alternatives
faz é gerenciar o que esses links podem apontar, atribuindo prioridades e oferecendo opções.
Na verdade, o primeiro parágrafo da página do manual:
update-alternatives creates, removes, maintains and displays
information about the symbolic links comprising the Debian alternatives
system.