Skip to content
Back to the catalog
Project shellSystemsIntermediateBeta

Tu propio shell

fork, exec, pipes y redirecciones. Construye un intérprete de comandos POSIX que ejecute programas de verdad.

Build it in your language

The tester treats your program as a black box: any language works. These are just the most convenient ones for this project.

Guide language

The stage guides read in this language. Only languages this project is fully translated into show up here; the interface language does not change.

What this project is about

Un shell es el programa con el que hablas con tu sistema operativo todos los días: lee una línea, decide qué significa y pone al kernel a trabajar. Por dentro es sorprendentemente pequeño, y entenderlo cambia para siempre cómo lees un error de terminal.

En este reto construyes el tuyo: un intérprete que lanza procesos reales, encadena comandos con tuberías, redirige entrada y salida y devuelve códigos de salida correctos. Al final podrás ejecutar ls | grep .txt > salida.txt en un shell escrito por ti.

Roadmap

12 stages across 4 phases. Every stage comes with its guide and its tests: you move on when they pass.

  1. Phase 13 stages

    El bucle mínimo

    Lee una línea, ejecuta un binario y espera a que termine. Tu primer proceso hijo.

    1. 01Leer comandos
    2. 02fork y exec
    3. 03Esperar y devolver estado
  2. Phase 23 stages

    Comandos internos y PATH

    cd, pwd y exit, búsqueda en el PATH y códigos de salida correctos.

    1. 01Comandos internos
    2. 02Búsqueda en PATH
    3. 03Comillas y escapes
  3. Phase 34 stages

    Tuberías y redirecciones

    Conecta procesos con pipe, redirige ficheros con dup2 y encadena varios comandos.

    1. 01Una tubería
    2. 02Tuberías encadenadas
    3. 03Redirección de salida
    4. 04Redirección de entrada
  4. Phase 42 stages

    Señales y segundo plano

    Ctrl-C que no te mata, trabajos en background y limpieza de zombis.

    1. 01Señales y primer plano
    2. 02Trabajos en background

Before you start

Un intérprete de comandos interactivo compatible con lo esencial de POSIX: prompt, parseo de la línea, comandos internos (cd, exit, pwd), ejecución de binarios buscándolos en el PATH, tuberías encadenadas, redirecciones de entrada y salida, y gestión de procesos en primer y segundo plano.

  • container-runtime
    Beta

    Build your own container

    namespaces, cgroups and chroot. Isolate a process by hand and understand what Docker does when it starts an image.

    Expert8 stages~16 hSystems
    namespacescgroupsprocesos

    Go · C · Rust

  • neural-network
    Ready to build

    A Neural Network from Scratch

    Build and train a neural network from first principles: forward pass, loss functions, and gradient descent optimization.

    Beginner6 stages~6 hSystems
    machine learningneural networksmath+1

    Python · TypeScript

  • garbage-collector
    Beta

    A garbage collector

    Mark-and-sweep from scratch. Manage memory the way the runtimes you use daily do without you noticing.

    Expert9 stages~18 hSystems
    memoriamark & sweeppunteros

    C · C++ · Rust