Read some good books, notably Advanced Linux Programming and Advanced Unix Programming. Read also the advanced bash scripting guide and other documentation from Linux Documentation Project
Obviously, install some Linux distribution on your laptop (not in some VM, but on real disk partitions). If you have a debian like distribution, run aptitude build-dep gcc-4.6 gedit
on it to get a lot of interesting developers packages.
Learn some command line skills. Learn to use the man
command; after installing manpages
and manpages-dev
packages, type man man
(use the space bar to "scroll text", the q
key to quit). Read also the intro(2) man page. When you forgot how to use a command like cp
try cp --help
.
Use a version control system like git, even for one person tiny projects.
Backup your files.
Read several relevant Wikipedia pages on Linux, kernels, syscalls, free software, X11, Posix, Unix
Try hard to use the command line. For instance, try to do everything on the command line for a week or more. Avoid using your desktop, and possibly your mouse. Learn to use emacs
.
Read about builder programs like GNU make
Retrieve several free software from their source code (e.g. from sourceforge or freecode or github) and practice building and compiling them. Study their source code
Basic tips to start (if a command is not found, you need to install the package providing it) in command line (in a terminal).
run emacs
; there is a tutorial menu; practice it for half an hour.
edit a helloworld.c
program (with a main
calling some hello
function)
compile it with gcc -g -Wall helloworld.c -o helloworld
; improve your code till no warnings are given. Always pass -Wall
to gcc
or g++
to get almost all warnings.
run it with ./helloworld
debug it with gdb ./helloworld
, then
- use the
help
command
- use the
b main
command to add a breakpoint in main
and likewise for your hello
function.
- run it under
gdb
using r
- use
bt
to get a backtrace
- use
p
to print some variable
- use
c
to continue the execution of the debugged program.
write a tiny Makefile
to be able to build your helloworld
program using make
learn how to call make
(with M-x compile
) and gdb
(with M-x gdb
) from inside Emacs
Learn more about valgrind (to detect most memory leaks). Perhaps consider using Boehm's GC in some of your applications.