if anyone knows of some good tutorials or links covering the how/to's of programming C completly off of linux command line... inputs would be greatly appreciated ... --thanx

Dani AI

Generated

A compact, practical workflow works best when you want to do C completely from the shell: pick a terminal editor, compile and link with gcc, run and test, debug with gdb/valgrind, then automate builds with make. That answers 's editor question: nano is easiest for beginners; vim or emacs pay off once you invest time. Learn to read compiler output and man pages — those skills replace many IDE conveniences.

Common compile commands and what they mean. Adjust -std= to the C standard your course requires (C89/C99/C11). Use warning flags and include debug symbols while you learn.

gcc -std=c11 -Wall -Wextra -pedantic -O0 -g -o prog prog.c
gcc -c foo.c
gcc -o myapp foo.o bar.o -lm

Use -c to create object files and then link them; -lm links the math library. Keep -O0 and -g while debugging; optimizations change how variables appear in a debugger.

Quick debugging and tracing tips. Enable core dumps with ulimit -c unlimited if you prefer post-mortem analysis. strace is useful when a program fails while interacting with the OS.

gdb ./prog
# inside gdb:
# (gdb) break main
# (gdb) run
# (gdb) bt
# (gdb) print var

valgrind --leak-check=full ./prog
strace -o trace.txt ./prog

Further reading and tools: consult the GCC online docs, the GDB documentation, Valgrind and the Linux man-pages at man7.org. 's beginner site is a fine starting point; combine that with the above tools, small focused exercises, and reading the relevant man pages for sustained learning.

Recommended Answers

All 3 Replies

Are you looking to use a program that edits text solely from the command line?

no i jus started a class on assembly, C, and hardware and trying to get started programming C through linux command line... so any helpful webpages covering command line programming you may have would be appreciated

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.