Skip to content
Français
Sync not enabled: your progress stays in this browser My learning
Select theme
Français

The main dsoxlab commands, in the order you use them

By updated

Improve this page

Logo DSOXLab

Playing a dsoxlab lab means repeating the same steps in the same order: start, work, check, then start over or clean up. This page opens the "Playing a lab" module. It lays the commands out in the order you type them, says when each one is useful and points to the lesson that covers it in detail. It is written for anyone who has already played the demonstration lab and chosen a catalogue. You can also come back to it to find, at a glance, the command to type.

What you will learn

  • Name the order of a lab's commands, from start to cleanup.
  • Know which lesson of the module covers each step in detail.
  • Stop a lab's machines without destroying them, with infra stop and infra start.
  • Tell status, which talks about the lab, from infra status, which talks about the machines.
  • Recognise the three pairs that get mixed up: run and start, check and submit, reset and clean.
  • Name login, push and logout, the three sending commands, detailed in the lesson Send your results.

In what order do you type a lab's commands?

A lab is played in five steps: prepare the machine, start, work, check, then undo. Each step has its commands, and the table below lists them in order. The last column says which lesson covers the step in detail: this page only places it. On a shell lab, provision and destroy are of no use, since there is no machine to bring up or take down.

StepCommandWhat it doesWhere to learn it
Preparedsoxlab catalog add <id or URL>, dsoxlab doctor, dsoxlab use <section>, dsoxlab list-labs, dsoxlab show <id>, dsoxlab nextInstall a catalogue, check the machine, set a context, pick a labCatalogues and Finding a lab
Startdsoxlab start <id>, or dsoxlab provision then dsoxlab run <id>Prepare the environment and open the sessionStarting a lab
Workdsoxlab challenge, course, guide, ssh, hintRead the mission, the course, enter a machine, pay for a hintWorking in the lab
Checkdsoxlab check <id> or dsoxlab submit <id>, dsoxlab statusRun the tests, record the attempt, read the lab's stateGetting your work checked
Undodsoxlab reset <id>, dsoxlab clean <id>, dsoxlab destroy, dsoxlab infra stop --allStart from zero, delete what the lab created, take the machines down, or only stop themStarting over or cleaning up

As soon as a lab is active, its identifier becomes optional: dsoxlab check knows which lab you are in. Since identifiers are long, the lesson Installing dsoxlab locally also explains how to enable shell completion.

What does a lab's loop look like?

The loop is always the same: read, produce a state, let check measure it, fix if a test stays red. You have already been through it in the first lab, and the diagram below recalls it. Follow the arrow that goes back from check to "Produce": a red test closes nothing, you fix and run again, as many times as needed. The dotted line is the hint, optional, and it costs points.

The cycle of a lab: dsoxlab run opens the working directory, dsoxlab course then dsoxlab challenge give the material and the mission, the learner produces the requested state, then dsoxlab check runs the tests. If a test fails, back to producing; otherwise the score is recorded, equal to 100 minus the cost of the hints. Dsoxlab hint, dotted, leads to a paid hint before going back to producing.noyesdsoxlab runopens the working directorydsoxlab coursethen dsoxlab challengeProduce the requested statein the working directorydsoxlab checkruns the testsAttempt recordedfailed or passedTests green?Lab passedmaximum minus the hint costdsoxlab hintpaid hintcommand that opens the labwhat you docheckrecorded attemptlab passedoptional helpthenevery check runred tests: you fixgreen tests
Validation reads the state produced, never the history of the commands typed. Source · SVG
Esc to close, + and − to zoom, scroll to move around. 100 %

The tests read the state you produced, not the commands you typed: any path to the right state is valid. That is the rule that makes the loop fair, and it holds for every lab on the site.

Which three pairs of commands get mixed up?

Three pairs look alike and do not do the same thing: run and start, check and submit, reset and clean. Reading them side by side avoids the costliest mistake, typing the most destructive one thinking you typed the other.

PairFirst commandSecond command
Startrun prepares the environment and opens the session, without ever bringing the machines upstart plays the whole sequence (context, prerequisites, infrastructure, run) announcing each step
Checkcheck records the attempt and leaves the session opensubmit records it the same way, returns a mock exam's verdict, then closes the session
Undoreset puts the lab back to its initial state and erases the hints takenclean deletes what the lab created, without touching the hints

A fourth confusion comes from the name. dsoxlab status says where the lab stands, through a stable state (not_started, ready, in_progress, validated, degraded). dsoxlab infra status says which machines answer over SSH. The first never talks about the machines, the second never talks about the lab. The same line separates dsoxlab infra start, which turns stopped machines back on, from dsoxlab start <lab>, which plays a lab.

Which commands prepare the catalogue?

Six commands come before any lab. dsoxlab catalog add installs a catalogue by its name or by its repository URL. dsoxlab doctor says what that catalogue requires and what is missing on the machine. dsoxlab use sets the active section, dsoxlab list-labs and dsoxlab show describe the labs, and dsoxlab next suggests the first lab with no result. This page does not detail them: the lesson Installing and managing your dsoxlab lab catalogues covers catalog, the lesson Finding your next lab covers use, list-labs, show and next, and the lesson Installing dsoxlab locally covers doctor.

Keep one point in mind before going on: progress lives in the catalogue itself, in a .dsoxlab.db file at its root. Removing a catalogue with catalog remove, or reinstalling it with catalog add --force, therefore removes its history with it.

How do you stop the machines without destroying them?

To free your machine's memory without losing a lab's machines, type dsoxlab infra stop --all, then dsoxlab infra start --all to bring them back. If your dsoxlab does not know these commands, it is too old: update it with uv tool upgrade dsoxlab.

Three commands act on the catalogue's machines without deleting any. The table says what each one does and what it changes for your machine.

CommandWhat it doesEffect on your machine
dsoxlab infra stopShuts down each machine's system cleanly and waits until it is off, 120 seconds by default (--timeout changes that delay)Frees the memory. The disks stay
dsoxlab infra pauseFreezes the machinesFrees the processor, but not the memory, which stays in use
dsoxlab infra startRestarts the stopped machines and resumes the frozen onesStopped machines take their memory back, frozen machines their processor

These commands do not guess which machines to target: you must always name them. --host web targets one, and you repeat the option to target several (short name, or full name such as web.lab). --all targets every machine in the catalogue. With neither, the command is refused, because shutting down the whole fleet has to be your choice. Only the machines that the catalogue's meta.yml declares are touched, never another machine on the hypervisor, the software that runs virtual machines. Typing the same command twice changes nothing more: a machine that is already stopped, frozen or restarted is left as it is.

The example below stops the whole catalogue, checks that no machine answers any more, then brings them back.

Terminal window
dsoxlab infra stop --all # frees the memory, keeps the disks
dsoxlab infra status # reports each machine that is not running, with its state
dsoxlab infra start --all # restarts the stopped machines

If a machine is still running when the delay ends, infra stop reports it and exits with code 1. Add --force then: it cuts the machine's power, without deleting anything. Finally, these three commands only work with the kvm and incus providers, the ones that run the machines on your computer. With outscale, which has no local hypervisor, they are refused with code 2.

infra start turns the machines back on, but opens no lab. To pick a lab back up after a shutdown, first type dsoxlab infra start --all, check with dsoxlab infra status that the machines answer, then type dsoxlab start <lab>, which prepares the lab and opens the session. As long as a machine is stopped or frozen, dsoxlab check and dsoxlab ssh fail because it does not answer, not because your work is wrong: restart it before drawing a conclusion.

How do you follow your progress with progress and scores?

dsoxlab progress shows progress by block: labs completed, average score, challenges and capstones. On a long course, it is the command that says what is left to prove. dsoxlab scores lists the full history of recorded marks, failed attempts included, and --top sets the number of lines. A Verdict column appears on catalogues that declare at least one mock exam.

Terminal window
dsoxlab progress
dsoxlab scores --top 10

In the Verdict column, a mock exam shows reçu (75%) or recalé (75%) (passed or failed, as the French-language CLI prints them), and an ordinary lab ·. The percentage in parentheses is the mock exam's pass mark, not the mark obtained. progress and scores accept --json, like list-labs, show, next, check, status, doctor, validate-structure and support: the document returned carries a schema field, and verdicts are read in stable tokens, never in a translated label.

How do you send your evidence to your account?

Three commands carry the sending of results from the terminal, and nothing leaves until you type one of them: check and submit never send anything. The lesson Send your results details each of them, with and without an account, and says what leaves and what never does.

Terminal window
dsoxlab login # opens the browser, then writes the local session
dsoxlab login --no-browser # prints the URL to open elsewhere, and waits for the return URL
dsoxlab push --dry-run # says what would leave, and stops there
dsoxlab push # sends the current catalogue's attempts
dsoxlab logout # forgets this portal's local session

Sending is voluntary from end to end. Three conditions must coincide: the catalogue declares a learning.sync block in its meta.yml, you have run dsoxlab login, and you type dsoxlab push. push merges with what the account already holds, without overwriting anything.

The manual route still exists: dsoxlab export writes a JSON file that you import in your browser, a step described in the lesson Send your results. It stays useful when the machine that plays the labs cannot reach the portal, as Progress and data explains.

Which options apply to every command?

Three options go before the command: --verbose or -v, repeatable, --debug, equivalent to -vv, and --version. Whatever the verbosity, the full log is written to ~/.local/state/dsoxlab/dsoxlab.log, never to standard output: there is no need to replay a command to know what it did, and --json stays readable by a program even in verbose mode.

Terminal window
dsoxlab -vv provision
dsoxlab --version
dsoxlab fullhelp # the platform's full guide, in the terminal
dsoxlab <command> --help # a command's options

Check your version with dsoxlab --version, and keep the tool up to date (uv tool upgrade dsoxlab): an old version will not reproduce everything the Start, Work, Check and Start over lessons show.

The rest of the CLI, validate-structure, new, support and completion, serves the catalogue author and diagnostics. Creating a catalogue is the subject of the lesson Creating a course and its challenges from A to Z, and the exit codes are in Files, variables and exit codes.

Troubleshooting

None of these cases is a breakdown: the command typed assumed another one, or the chosen scope contains nothing. The message says so every time, and start avoids the first case by chaining provision itself.

SymptomCauseSolution
run exits with 2 on a vm lab and names provisionThe machines do not exist yetdsoxlab provision, or dsoxlab start <id> which chains it
provision exits with 1 without starting, for lack of a keyNo private key in the catalogue's ssh/: it is never committeddsoxlab instructor bootstrap, once per clone (trainer infrastructure)
next exits with 1 and suggests nothingThe active scope contains no lab: wrong section or level, or empty cataloguedsoxlab use --reset to get the whole catalogue back, then dsoxlab list-labs

Key points

  • A lab is played in five steps: prepare, start, work, check, undo.
  • start chains context, prerequisites, infrastructure and run, announcing each step; run alone never provisions.
  • check records an attempt and leaves the session open; submit does the same then closes the session.
  • reset puts the lab back to zero and erases the hints taken; clean deletes what the lab created, without touching the hints.
  • status talks about the lab, infra status talks about the machines.
  • infra stop --all frees the memory and keeps the disks; destroy deletes the machines and their disks.
  • The tests read the state produced, never the commands typed.
  • push sends the evidence to the account, and nothing leaves without the three conditions: learning.sync declared, login run, push typed.
  • The full log is always in ~/.local/state/dsoxlab/dsoxlab.log.

Knowledge check

Check that you have the essentials of this guide. The questions only cover what has just been explained here.

Knowledge check

Check what you have learned with this interactive quiz

8 questions
6 min
70% to pass

How it works

  • The timer starts when you click Start
  • Multiple choice, true/false and short answer questions
  • You can move between questions
  • Detailed results are shown at the end

Starts the quiz and the timer