Debian provides compilers, interpreters, debuggers, and version control for software development.
Install compiler, linker, make, and headers:
sudo apt install build-essential
This pulls in gcc, g++, make, libc6-dev, and related tools.
Compile C program:
gcc -o program program.c gcc -Wall -O2 -o program program.c # with warnings and optimization
Compile C++:
g++ -o program program.cpp
Link multiple files:
gcc -c file1.c -o file1.o gcc -c file2.c -o file2.o gcc -o program file1.o file2.o -lm # -lm links math library
Use gdb (GNU Debugger):
sudo apt install gdb gcc -g -o program program.c # -g includes debug info gdb program
Common gdb commands:
- run — start program
- break main — set breakpoint
- step — step into
- next — step over
- print variable — inspect variable
- continue — resume
Memory checking:
sudo apt install valgrind valgrind ./program
Install Python:
sudo apt install python3 python3-pip
Install Node.js:
sudo apt install nodejs npm
Install Ruby:
sudo apt install ruby
Install Go:
sudo apt install golang-go
Language-specific package managers:
- Python: pip3 install package
- Node: npm install package
- Ruby: gem install package
- Go: go get package
Install Git:
sudo apt install git git config --global user.name "Your Name" git config --global user.email "[email protected]"
Clone a repo:
git clone https://github.com/user/repo.git
Make is standard:
sudo apt install make make # runs default target make install # runs install target
CMake for cross-platform:
sudo apt install cmake
Find what package provides a library:
apt-file search libssl-dev apt-cache search libssl
Install development headers (most common):
sudo apt install libfoo-dev sudo apt install libssl-dev
Build dependencies for existing package:
sudo apt build-dep package-name
vim or emacs — powerful text editorsgedit — GNOME text editorMost developers use editor + CLI tools rather than full IDE on Debian servers.