I have seen somewhere that "bash is used to communicate with the Linux kernel."
Is it applicable only to the terminal? Or does every program (including programs which has GUIs) have to go through the shell to complete the process they willing to make?
(Consider we are coloring a photo. How does bash know what we are doing? Is there a third party between gimp and bash to convert them to bash?)
It would be really helpful if can you take an example to explain 🙂
Best Answer
Nope. Only users have to go through a shell to communicate with the Kernel. Applications use APIs.
For example, if I want to delete a file, I have to use one shell or the other, and then an application to delete the file:
bash
, I can use therm
command to delete the file.Both the File Manager and
rm
in turn may use theunlink(3)
(or the higher levelremove(3)
) function (or system call) to do the actual work.