System Shutdown C Program For Linux Ubuntu

Code For System Shutdown C Program in Linux Ubuntu

Learn How To Code A System Shutdown C Program in Linux Ubuntu Operating System. This C Program To ShutDown Your Linux System makes use of Linux System Calls. This is an Auto Shutdown C Program which will Turn Off your System within the mentioned Time period in the parameters.

The system() method is defined in the Standard Library in C Programming. Hence, it is important to include stdlib.h header file.

The system() method takes in the following arguments:

  • Shutdown / Restart
  • Process / Cancel
  • Time Limit

You have the option to cancel the shutdown timer if you have activated it by executing the program given below. All you need is to type the following command.

C Program To Shutdown A Linux Ubuntu Operating System


System Shutdown C Program in Linux Ubuntu OS

If you have any compilation errors or doubts in the above C Program To Shutdown Your Linux Ubuntu System using PThread, let us know about in the Comment Section below.

Recommended Programs
C Program To Calculate Sum of N Numbers
C Program To Check Armstrong Numbers
Find Largest Digit in an Integer in C Programming
C Program To Find Arithmetic Progression
C Program To Print Hello World Without Using A Semicolon
C Program To Display Date and Time

Tushar Soni

I am Tushar Soni, Co - Founder of CodingAlpha. I am a computer science student from India and passionate about Web Development and Programming. Connect with me on Facebook | LinkedIn | Google Plus

One thought on “System Shutdown C Program For Linux Ubuntu

  • August 21, 2016 at 12:10 pm

    Will the same C Program to shutdown system work in Linux versions such as Mint, Fedora, Redhat?


Join The Discussion