But some things are directories (like cgroups). And Networknamespaces were also controled in a weird way.
And then there are kernel features which are not exposed through a file or syscall but through a special type of socket.
Directories are just files if you squint at then right, and sockets are basically files too. As another commenter said, it’s not that everything is literally a file, but that it presents as a file, and can be interacted with as one.
But some things are directories (like cgroups). And Networknamespaces were also controled in a weird way.
And then there are kernel features which are not exposed through a file or syscall but through a special type of socket.
Aren’t directories just files that say “hey i am directory ABCD and file X, Y and Z are my childs”?
Directories are just files if you squint at then right, and sockets are basically files too. As another commenter said, it’s not that everything is literally a file, but that it presents as a file, and can be interacted with as one.