Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
Is there any way to execute Linux commands with c without using execlp(), like predefined functions or something else.
execlp()
Thanks.
Use system() or popen() if you need the commands output.
system()
popen()
Add a comment
system(const char *command); sounds to be what you want
system(const char *command);
You can use system. It execute the command, but take care since it invoke a shell to interpret the command (breaking argument list on space, ...).
system
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.