- Dependencies
- Termux In Android Installation From Repository
- Termux In Android Installation From Source
- Linux Distros System Installation From Repository
- Linux Distros System Installation From Source
-
Android users should install Termux App.
-
python3and optionallypip3should be installed in your system.- Termux (non-root shell):
pkg install python. Check https://wiki.termux.com/wiki/Python for details.pipwill automatically be installed. - Linux distros:
sudo apt install python3 python3-pip.
- Termux (non-root shell):
-
The
ruamel.yamlpython module is used to loadYAMLmanifest files. Check Install instructions for more info.- Termux (non-root shell):
pip install ruamel.yaml. - Linux distros:
sudo pip3 install ruamel.yaml.
- Termux (non-root shell):
pkg install termux-create-package
The termux-create-package file should be installed in termux bin directory /data/data/com.termux/files/usr/bin.
It should have termux uid:gid ownership and have readable 700 permission before it can be sourced.
pkg install curl && \
export install_path="/data/data/com.termux/files/usr/bin" && \
mkdir -p "$install_path" && \
curl -L 'https://github.com/termux/termux-create-package/releases/latest/download/termux-create-package' -o "$install_path/termux-create-package" && \
export owner="$(stat -c "%u" "$install_path")"; chown "$owner:$owner" "$install_path/termux-create-package" && \
chmod 700 "$install_path/termux-create-package";
- Export install directory path and create it.
export install_path="/data/data/com.termux/files/usr/bin"
mkdir -p "$install_path"
-
Download the
termux-create-packagefile.-
Download to install directory directly from github using
curlusing a non-root termux shell.
Runpkg install curlto installcurlfirst.-
Latest release:
curl -L 'https://github.com/termux/termux-create-package/releases/latest/download/termux-create-package' -o "$install_path/termux-create-package" -
Specific release:
curl -L 'https://github.com/termux/termux-create-package/releases/download/v0.12.0/termux-create-package' -o "$install_path/termux-create-package" -
Master Branch may be unstable:
curl -L 'https://github.com/termux/termux-create-package/raw/master/src/termux-create-package' -o "$install_path/termux-create-package"
-
-
Download
termux-create-packagefile manually from github to the android download directory and then copy it to install directory.You can download the
termux-create-packagefile from a github release from theAssetsdropdown menu.You can also download it from a specific github branch/tag by opening the
termux-create-packagefile from theCodesection.
Right-click or hold theRawbutton at the top and selectDownload/Save link.Then copy the file to install directory using
catcommand below or use a root file browser to manually place it.cat "/storage/emulated/0/Download/termux-create-package" > "$install_path/termux-create-package"
-
-
Set
termuxownership and readable permissions.-
If you used a
curlorcatto copy the file, then use a non-root termux shell to set ownership and permissions withchownandchmodcommands respectively:export owner="$(stat -c "%u" "$install_path")"; chown "$owner:$owner" "$install_path/termux-create-package" && chmod 700 "$install_path/termux-create-package"; -
If you used a root file browser to copy the file, then use
suto start a root shell to set ownership and permissions withchownandchmodcommands respectively:export owner="$(stat -c "%u" "$install_path")"; su -c "chown \"$owner:$owner\" \"$install_path/termux-create-package\" && chmod 700 \"$install_path/termux-create-package\""; -
Or manually set them with your root file browser. You can find
termuxuidandgidby running the commandid -uin a non-root termux shell or by checking the properties of the termuxbindirectory from your root file browser.
-
sudo pip3 install termux-create-package
The termux-create-package file should be placed in the /usr/local/bin directory if you want to install it system-wide for all users as per FHS 3.0.
It should have readable 755 permission before it can be sourced.
The install command for curl is for Ubuntu/Debian, it may be different for other distros.
sudo apt install curl && \
export install_path="/usr/local/bin" && \
sudo mkdir -p "$install_path" && \
sudo curl -L 'https://github.com/termux/termux-create-package/releases/latest/download/termux-create-package' -o "$install_path/termux-create-package" && \
sudo chmod 755 "$install_path/termux-create-package";
- Export install directory path and create it.
export install_path="/usr/local/bin"
mkdir -p "$install_path"
-
Download the
termux-create-packagefile.-
Download to install directory directly from github using
curlusing a root shell withsudo.
Runsudo apt install curlto installcurlfirst.-
Latest release:
sudo curl -L 'https://github.com/termux/termux-create-package/releases/latest/download/termux-create-package' -o "$install_path/termux-create-package" -
Specific release:
sudo curl -L 'https://github.com/termux/termux-create-package/releases/download/v0.12.0/termux-create-package' -o "$install_path/termux-create-package" -
Master Branch may be unstable:
sudo curl -L 'https://github.com/termux/termux-create-package/raw/master/src/termux-create-package' -o "$install_path/termux-create-package"
-
-
Download
termux-create-packagefile manually from github to the install directory.You can download the
termux-create-packagefile from a github release from theAssetsdropdown menu.You can also download it from a specific github branch/tag by opening the
termux-create-packagefile from theCodesection.
Right-click or hold theRawbutton at the top and selectDownload/Save link.Then copy the file to install directory using
catcommand below or use a root file browser to manually place it (sudo nautilus).sudo cat "termux-create-package" > "$install_path/termux-create-package"
-
-
Set readable permissions.
-
Set ownership and permissions with
chownandchmodcommands respectively:sudo chmod 755 "$install_path/termux-create-package"
-