The /sys Virtual File System
The kernel manages the internals of the operating system and prevents unauthorized access to its internal structures. Some user space applications need to access and communicate with those internal objects but the kernel must protect itself from unwanted intrusions. It does this by reflecting its internal objects out to the user space as regular files and gathers them together in a virtual file system which it mounts as the /sys directory. This is not the only virtual file system but it is very important that you understand it very well because it is used as the main interface from your application to all of the peripheral interfaces.