Ctrtool is a multi-purpose utility to create Linux containers, as well as perform other operations related to Linux containers.


ctrtool [command] [arguments]

Values for [command] are:


  • In-application help text is nonexistent for most of the above programs. Since ctrtool is effectively a command multiplexer similar to busybox, we should probably create a dedicated "help" applet.
  • When printing error messages, existing file descriptors are not closed. If any existing file descriptor that ctrtool opens has the numeric value of 2, stderr could be confused with it. To guard against this, whenever ctrtool starts up, it will check that 0, 1, and 2 are already open and if not, it will open a dummy file to replace it. Currently, it's an eventfd, though I would much rather make it say, an eventpoll file descriptor.
  • The cl_nsenter_params library function needs to be made into its own separate command.
  • Although we tried to differentiate successes from failures using zero and non-zero exit statuses, non-zero exit statuses for failures are inconsistent across programs and various error conditions (mount_seq is a notable exception).
  • Ctrtool is currently only compatible with Linux, but we might port (a subset of) some of the other applets to other UNIX systems in the future (e.g. the container launcher is difficult to port, but ns_open_file without namespace support might be easier to port to other systems, and we might have e.g. FreeBSD-specific syscalls for that instead.
This end-user documentation is part of ctrtool. Reproduction and use of this material for any purpose is permitted, provided that a link to this page is provided as attribution.