- 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.
-
python3
and optionallypip3
should be installed in your system.- Termux (non-root shell):
pkg install python
. Check https://wiki.termux.com/wiki/Python for details.pip
will automatically be installed. - Linux distros:
sudo apt install python3 python3-pip
.
- Termux (non-root shell):
-
The
ruamel.yaml
python module is used to loadYAML
manifest 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-package
file.-
Download to install directory directly from github using
curl
using a non-root termux shell.
Runpkg install curl
to installcurl
first.-
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-package
file manually from github to the android download directory and then copy it to install directory.You can download the
termux-create-package
file from a github release from theAssets
dropdown menu.You can also download it from a specific github branch/tag by opening the
termux-create-package
file from theCode
section.
Right-click or hold theRaw
button at the top and selectDownload/Save link
.Then copy the file to install directory using
cat
command 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
termux
ownership and readable permissions.-
If you used a
curl
orcat
to copy the file, then use a non-root termux shell to set ownership and permissions withchown
andchmod
commands 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
su
to start a root shell to set ownership and permissions withchown
andchmod
commands 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
termux
uid
andgid
by running the commandid -u
in a non-root termux shell or by checking the properties of the termuxbin
directory 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-package
file.-
Download to install directory directly from github using
curl
using a root shell withsudo
.
Runsudo apt install curl
to installcurl
first.-
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-package
file manually from github to the install directory.You can download the
termux-create-package
file from a github release from theAssets
dropdown menu.You can also download it from a specific github branch/tag by opening the
termux-create-package
file from theCode
section.
Right-click or hold theRaw
button at the top and selectDownload/Save link
.Then copy the file to install directory using
cat
command 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
chown
andchmod
commands respectively:sudo chmod 755 "$install_path/termux-create-package"
-