Update cheatsheets

This commit is contained in:
ivuorinen
2026-01-25 00:25:05 +00:00
parent 7b572f2b7c
commit 2aa4763c61
10 changed files with 238 additions and 3 deletions

42
tldr/linux/apptainer-exec Normal file
View File

@@ -0,0 +1,42 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# apptainer exec
> Execute a command within an Apptainer container.
> See also: `apptainer run`, `apptainer shell`.
> More information: <https://apptainer.org/docs/user/main/cli/apptainer_exec.html>.
- Execute a command inside a container:
`apptainer exec {{path/to/image.sif}} {{command}}`
- Execute a command with arguments:
`apptainer exec {{path/to/image.sif}} {{command}} {{arg1 arg2 ...}}`
- Execute a command with a bind mount from host to container:
`apptainer exec {{[-B|--bind]}} {{path/to/source}}:{{path/to/destination}} {{path/to/image.sif}} {{command}}`
- Execute a command with environment variables:
`apptainer exec --env {{variable}}={{value}} {{path/to/image.sif}} {{command}}`
- Execute a command in fully isolated mode (contained filesystem, PID, IPC, and clean environment):
`apptainer exec {{[-C|--containall]}} {{path/to/image.sif}} {{command}}`
- Execute a command with a writable temporary filesystem overlay:
`apptainer exec --writable-tmpfs {{path/to/image.sif}} {{command}}`
- Execute a command with NVIDIA GPU support:
`apptainer exec --nv {{path/to/image.sif}} {{command}}`
- Display help:
`apptainer exec {{[-h|--help]}}`

43
tldr/linux/apptainer-run Normal file
View File

@@ -0,0 +1,43 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# apptainer run
> Run the default runscript of an Apptainer container.
> The runscript is defined in the `%runscript` section of the container's definition file.
> See also: `apptainer exec`, `apptainer shell`.
> More information: <https://apptainer.org/docs/user/main/cli/apptainer_run.html>.
- Run the default runscript of a container:
`apptainer run {{path/to/image.sif}}`
- Run with arguments passed to the runscript:
`apptainer run {{path/to/image.sif}} {{arg1 arg2 ...}}`
- Run with a bind mount from host to container:
`apptainer run {{[-B|--bind]}} {{path/to/source}}:{{path/to/destination}} {{path/to/image.sif}}`
- Run with environment variables:
`apptainer run --env {{variable}}={{value}} {{path/to/image.sif}}`
- Run in fully isolated mode (contained filesystem, PID, IPC, and clean environment):
`apptainer run {{[-C|--containall]}} {{path/to/image.sif}}`
- Run with a writable temporary filesystem overlay:
`apptainer run --writable-tmpfs {{path/to/image.sif}}`
- Run with NVIDIA GPU support:
`apptainer run --nv {{path/to/image.sif}}`
- Display help:
`apptainer run {{[-h|--help]}}`

View File

@@ -0,0 +1,22 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# apptainer run-help
> Display user-defined help for an Apptainer container image.
> Help text is defined in the `%help` section of the container's definition file.
> More information: <https://apptainer.org/docs/user/main/cli/apptainer_run-help.html>.
- Display help for a container:
`apptainer run-help {{path/to/image.sif}}`
- Display help for a specific app within a container:
`apptainer run-help --app {{app_name}} {{path/to/image.sif}}`
- Display help:
`apptainer run-help {{[-h|--help]}}`

View File

@@ -0,0 +1,42 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# apptainer shell
> Start an interactive shell within an Apptainer container.
> See also: `apptainer exec`, `apptainer run`.
> More information: <https://apptainer.org/docs/user/main/cli/apptainer_shell.html>.
- Start an interactive shell inside a container:
`apptainer shell {{path/to/image.sif}}`
- Start a shell with a bind mount from host to container:
`apptainer shell {{[-B|--bind]}} {{path/to/source}}:{{path/to/destination}} {{path/to/image.sif}}`
- Start a shell with environment variables:
`apptainer shell --env {{variable}}={{value}} {{path/to/image.sif}}`
- Start a shell in fully isolated mode (contained filesystem, PID, IPC, and clean environment):
`apptainer shell {{[-C|--containall]}} {{path/to/image.sif}}`
- Start a shell with a writable temporary filesystem overlay:
`apptainer shell --writable-tmpfs {{path/to/image.sif}}`
- Start a shell with NVIDIA GPU support:
`apptainer shell --nv {{path/to/image.sif}}`
- Start a shell using a specific shell program:
`apptainer shell {{[-s|--shell]}} {{path/to/shell}} {{path/to/image.sif}}`
- Display help:
`apptainer shell {{[-h|--help]}}`

34
tldr/linux/apptainer-test Normal file
View File

@@ -0,0 +1,34 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# apptainer test
> Run the testscript defined in an Apptainer container image.
> The testscript is defined in the `%test` section of the container's definition file.
> More information: <https://apptainer.org/docs/user/main/cli/apptainer_test.html>.
- Run the testscript of a container:
`apptainer test {{path/to/image.sif}}`
- Run the testscript with a bind mount from host to container:
`apptainer test {{[-B|--bind]}} {{path/to/source}}:{{path/to/destination}} {{path/to/image.sif}}`
- Run the testscript in fully isolated mode (contained filesystem, PID, IPC, and clean environment):
`apptainer test {{[-C|--containall]}} {{path/to/image.sif}}`
- Run the testscript with a writable temporary filesystem overlay:
`apptainer test --writable-tmpfs {{path/to/image.sif}}`
- Run the testscript for a specific app within a container:
`apptainer test --app {{app_name}} {{path/to/image.sif}}`
- Display help:
`apptainer test {{[-h|--help]}}`

View File

@@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# cam
> Frontend tool for `libcamera`.
> See also: `v4l2-ctl`.
> More information: <https://libcamera.org/docs.html>.
- List available cameras:

View File

@@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# v4l2-ctl
> Control video devices.
> See also: `cam`.
> More information: <https://manned.org/v4l2-ctl>.
- List all video devices: