For example, I thought the ln command in the shell is implemented by link() and symlink() provided by C,so I checked the src of the ln, but it seems it doesn't utilize them.
For example, I thought the ln command in the shell is implemented by link() and symlink() provided by C,so I checked the src of the ln, but it seems it doesn't utilize them.
Yes, many Linux commands are written in C; and many of those C programs might use C library functions like link() or symlink(). Various Linux shells (e.g. sh, csh and bash) are themselves written in C, and also use C library calls.
HOWEVER...
link() and symlink() are both POSIX-compliant wrapper functions, they're not part of the "Standard C Library". Consequently, The "ln" command doesn't use them. See unistd.h for more details.