Differences between /init and /sbin/init
In Linux boot order, the kernel will execute /sbin/init
, however, I can see another file /init
existing in the file system on my linux (CentOS 8 WSL2, Ubuntu 20 WSL2).
They are different binaries:
$ diff /init /sbin/init
Binary files /init and /sbin/init differ
What are the differences between /sbin/init
and /init
?
/usr/sbin/init
or /sbin/init
is the executable starting the SysV initialization system. For compatibility reason, when systemd
is installed, it's an alias to an executable of the systemd
world.
The executable /init
is unusual, in a Linux system. I suggest to investigate the reasons why it's present. It could be the part of a malware.