I just moved from .net development to LINUX MONO development... and i don have much experience with linux dev earlier..
I have a requirement to create a background service (like windows services) in mono c#.. is it possible..
And is it possible to access the LINUX native APIs from mono c#. (like winAPI calls from win c#)..
Mono ships with a Windows Service compatible system called mono-service.
Just use p/invoke like you normally would. You can also check out the source code of some other simple mono-based projects like Banshee to see how they do p/invokes on Linux. Just search for banshee on google.com/codesearch.
As for LINUX (Unix api), you can use the Mono.UNIX library that is included with mono. Although as a general rule you should try to stick with portable solutions instead of stuff like Mono.UNix or p/invoke whenever possible.
For 1. - yes it is possible to create background service in mono c#. Service is in fact a program that runs in background takes no input from keyboard and mouse, and does not output to directly to the user's screen. After you create such program you can just run it with nohup ./programname & to set it to work into background and ignore the hangup signal (that is sent to your running processes when you log out).
If you want to integrate it better, then you must write some additional scripts for stopping, starting, restarting it, etc (depending on your chosen linux distribution).
I use scripts, so I can capture the exit code and use it to perform automated updates and things. It also restarts itself if it crashes, and e-mails you when it restarts with the last x lines of the log file.
/etc/init.d/MyMonoApp
/home/mono/MyMonoApp
Note: if you close the app using the init.d script, it will kill the process, rather than signal it to cleanly close.