Meefik's Blog

Freedom and Open Source

Managing Linux Deploy from the command line

07 Feb 2015 | android linuxdeploy

In addition to the graphical interface, Linux Deploy allows you to manage a GNU/Linux system instance from the command line via the Android terminal emulator. For these purposes, a special linuxdeploy script is used, which can be run from the Android command line and accepts the following parameters:

By default, the linuxdeploy script is located in the ENV_DIR/bin/linuxdeploy directory, where ENV_DIR is the directory of the working environment (by default /data/data/ru.meefik.linuxdeploy/linux), but access to it can be made more convenient (without specifying the full path to the script) if you place a symbolic link to this script in /system/bin. To do this, in the Linux Deploy settings there is an option “Settings” -> “Create a simlink”, after changing the parameter, you need to update the environment (“Settings” -> “Update ENV”).

All settings set through the Linux Deploy GUI are stored in the file ENV_DIR/etc/deploy.conf. They can be changed by editing this file, but it should be borne in mind that any changes to the parameters through the graphical interface will overwrite the file and lose the changes made. Switching profiles also overwrites the configuration file. However, you can copy the original configuration file, for example, to a memory card, edit it, and specify this file as the “-c FILE” parameter.

The linuxdeploy shell command is probably the most useful and necessary for accessing the command line of the installed distribution directly from the Android terminal. This command also has an optional parameter that accepts the command to be executed after switching to chroot, the bash command interpreter is started by default.

Usage examples:

linuxdeploy shell date
linuxdeploy shell "uname -a"
linuxdeploy shell /bin/bash

Comments