- 👤 Andrés Cruz

🇪🇸 En español

The Definitive Developer Ecosystem Guide: From Linux Terminal to Modern Software Architecture

Becoming a proficient software developer in today's world goes far beyond mastering a single programming language. It requires a holistic understanding of the ecosystem that brings our applications to life: the underlying operating system, often Linux; the tools that orchestrate the code, such as Git; the servers that deliver it to the world, like Apache; and the databases that store its information. Furthermore, it involves constant reflection on our craft, the impact of new technologies like AI, and the best practices that separate functional code from maintainable code. 

At DesarrolloLibre, we have documented every facet of this journey.

This pillar guide is a compendium of that experience. It is not a manual on a single topic, but a map of the territory every modern developer must navigate. 

We will start in the trenches of the Linux command line, mastering essential commands for managing processes, files, and automated tasks. Then, we will build a professional development environment, configuring web servers, databases, and testing tools. 

Section 1: Mastering the Linux Terminal

For many developers, the Linux command line is the true development environment. It's where servers are managed, tasks are automated, and problems are solved. Mastering the terminal is not an option, it's a necessity for anyone serious about software development, especially in the backend.

File and Process Management

Viewing Directory Size with du

A common task is checking disk space. The command du (disk usage) is your best ally. In its basic form, du -s * will show you the size of each file and directory in the current location, but in disk blocks, which is not very readable.

To make it useful, we combine options:

# Shows the size of each directory in a readable format 
du -sh * 
# Shows the total size of the current directory 
du -sh .

You can combine it with other commands like sort to find the heaviest directories:

# Lists directories and files, sorted by size from largest to smallest 
du -sh * | sort -rh

Master the use of disk space with our guide: How to view the size of directories and files in Linux?.

Terminating Processes with kill and killall

Sometimes a program stops responding and you need to force its closure. For this, the kill and killall commands exist.

 # Find the PID of Firefox 
 ps aux | grep firefox 
 # Kill the Firefox process using its PID (e.g., 1234) 
 kill 1234 
 # A more aggressive way if the first one doesn't work 
 kill -9 1234 
 # Or, simpler, using killall killall firefox 

The -9 signal (SIGKILL) is the most forceful way to terminate a process and should be used as a last resort, as it does not allow the program to save its state.

Learn to manage unruly processes in: The Kill and Killall commands in Linux.

Task Automation

Scheduling Tasks with cron

cron is a daemon (service) that runs in the background and allows you to schedule the execution of scripts or commands at specific times. Tasks are defined in a file called crontab.

The syntax of a crontab entry is:

* * * * * command_to_execute
| | | | |
| | | | +----- Día de la semana (0 - 7) (Domingo es 0 o 7)
| | | +------- Mes (1 - 12)
| | +--------- Día del mes (1 - 31)
| +----------- Hora (0 - 23)
+------------- Minuto (0 - 59)

To edit your crontab, you use the command crontab -e.

# Execute a backup script every day at 3:00 AM 
0 3 * * * /home/usuario/scripts/backup.sh 
# Execute a PHP command every 15 minutes 
*/15 * * * * /usr/bin/php /var/www/proyecto/artisan schedule:run

cron is the cornerstone of automation on Linux servers, ideal for backups, log cleaning, and any repetitive task.

Automate your scripts with: Automatically execute script with Cron in Linux.

Running Commands at System Startup with rc.local

If you need a command to run only once every time the system boots, the /etc/rc.local file is the traditional place for it. Although some modern distributions have deprecated it in favor of systemd, it still works in many.

The file is a simple shell script. Any command you add before the final exit 0 will run during the boot process.

#!/bin/sh -e 
# /etc/rc.local 
# Executes a custom script at startup 
/home/usuario/mis_scripts/iniciar_servidor_juego.sh 
exit 0

Make sure the file has execute permissions (chmod +x /etc/rc.local).

Learn to configure startup scripts in: How to execute a terminal command when starting our Linux?.

Common Problem Solving

command not found in the Terminal

This is perhaps the most common error for newcomers. It happens when you try to run a program and the shell (like bash or zsh) doesn't know where to find the executable. The solution is almost always to add the program's directory to the PATH environment variable.

The PATH is a list of directories where the shell looks for commands. You can view your current PATH with echo $PATH.

To add a new path temporarily, you use export:

$ export PATH=$PATH:/ruta/a/mis/binarios

For it to be permanent, you must add that line to your shell's configuration file (.bashrc, .zshrc, .profile, etc.) in your home directory.

# Add the path to the Flutter SDK 
echo 'export PATH=$PATH:/Users/andrescruz/development/flutter/bin' >> ~/.zshrc 
# Reload the configuration 
source ~/.zshrc
Ver Listado »