Forrest logo
back to the mksquashfs tool

mksquashfs:tldr:de3b9

mksquashfs: Create or append files and directories to a squashfs filesystem, using a specific [comp]ression algorithm.
$ mksquashfs ${filename_or_directory1 filename_or_directory2 ---} ${filesystem-squashfs} -comp ${select}
try on your machine

This command is used to create a SquashFS file system. SquashFS is a compressed read-only file system commonly used in Linux distributions.

Let's break down the command:

  1. mksquashfs: This is the command used to create a SquashFS file system.

  2. ${filename_or_directory1 filename_or_directory2 ---}: These are the input files or directories that you want to include in the SquashFS file system. You can specify multiple file names or directories separated by spaces. The --- signifies the end of the input files or directories list.

  3. ${filesystem-squashfs}: This is the output file that will contain the SquashFS file system. It is the name and path of the file you want to create.

  4. -comp ${select}: This option specifies the compression algorithm to use for the SquashFS file system. ${select} should be replaced with the desired compression algorithm. For example, you can use -comp gzip for using gzip compression. There are multiple compression options available, including gzip, lzma, lzo, xz, and zstd.

By executing this command, you will create a SquashFS file system using the specified input files or directories and the chosen compression algorithm. The resulting file will be stored in the provided output file path.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the mksquashfs tool