termux-app

termux活跃维护

在 Android 手机上提供完整的 Linux 终端环境,通过安装各类软件包把手机变成便携开发机。

Termux - a terminal emulator application for Android OS extendible by variety of packages.

v0.118.3发布于 2025-05-22 22:47 UTC64,538star +242 / 7 天8,264fork同步于 2026-11-10 11:18 UTC

怎么上手

由 README 提炼,执行前请确认
从 https://f-droid.org/en/packages/com.termux/ 下载 APK 安装;或从 https://github.com/termux/termux-app/releases 下载对应 apt-android-7 变体 APK
硬件要求按 README 说明

运行于 Android 7 及以上设备;Android 5/6 仅 GitHub 版可装应用但不支持包更新;README 未提及显存或 GPU 要求

支持 Apple Silicon
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

Android 上的终端模拟器与 Linux 环境,用包管理器扩展成随身开发环境

在 Android 手机上提供完整的 Linux 终端环境,通过安装各类软件包把手机变成便携开发机。

核心能力

  • 提供终端模拟与完整 Linux shell 环境
  • 通过 pkg/apt 安装并管理大量软件包
  • 配套 API、Boot、Float、Widget 等插件扩展能力
  • 支持 F-Droid、GitHub 等多渠道获取 APK

容易踩的坑

不同来源的 APK 签名不同,混装会报 INSTALL_FAILED_UPDATE_INCOMPATIBLE,换源前须先卸载全部 Termux 及插件;Android 12+ 系统会杀进程,可能看到 signal 9 提示;GitHub 版用共享测试密钥签名,勿从第三方渠道安装;应用本体不含软件包,需另配 termux-packages 源

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v0.118.3
  1. v0.119.0-beta.3pre-release2025-05-22 · 2025-05-22 22:48 UTC
    查看更新说明
  2. v0.118.3最新正式版2025-05-22 · 2025-05-22 22:47 UTC

    v0.118.3 - 2025-05-22 10:47

    Commit history: v0.118.2...v0.118.3

    Changed

    • ! Remove TERMUX_APP__BUILD_DATA_DIR as a different naming scheme will be used for build variables and rename TERMUX__ROOTFS to TERMUX__ROOTFS_DIR. (849e6b10)

     

     

    Fixed


     

  3. v0.119.0-beta.2pre-release2025-03-29 · 2025-03-29 07:05 UTC
    查看更新说明
  4. v0.118.22025-03-29 · 2025-03-29 07:00 UTC
    查看更新说明

    v0.118.2 - 2025-03-29 07:00

    Commit history: v0.118.1...v0.118.2

    Added

    • Add package SE_PROCESS_CONTEXT, SE_FILE_CONTEXT and SE_INFO when generating app info markdown string. (999f10d7)

    • Add info to device info for supported ABIs for armv8l and 64-bit-only aarch64 devices and PAGE_SIZE for 16KB page size devices. (3aa986cf)

    • Export additional primary TERMUX_* scoped shell environment variables, i.e TERMUX__ROOTFS, TERMUX__HOME, TERMUX__PREFIX, TERMUX_APP__DATA_DIR, TERMUX_APP__LEGACY_DATA_DIR, TERMUX_APP__BUILD_DATA_DIR, TERMUX__SE_PROCESS_CONTEXT, TERMUX_APP__SE_FILE_CONTEXT, TERMUX_APP__SE_INFO and ANDROID__BUILD_VERSION_SDK. This is also required for libtermux-exec-*-ld-preload.so $LD_PRELOAD library as well for termux-exec version >= 2.0.0. (b7d2a4b6, 8440a728)

    • Basic MIME type recognition in ContentProvider. (c5f000a1)

    • Terminal CSI reporting of window and cell pixel size. (254e885f)

    • Fill .ws_xpixel and .ws_ypixel in winsize. (bb7fa88f)

    • Do not show AutoFill UI on Termux start and add support for usernames. Closes #3909. (043923e6)

    • Add support for Share selected text of terminal in long hold MORE menu so that users don't have to copy and paste to move text between apps. (2d38a1ca)

     

     

    Changed

    • Bump apt-android-7 bootstraps to 2025.03.28-r1. (a8f8be18)

    • Add PGUP and PGDN extra keys to repetitive keys so that long holding them triggers page scrolling instead of having to repeatedly press the key to change pages. (fa710c47)

    • Make Shift-PgUp and Shift-PgDn scroll by pages rather than lines. (915e053a)

     

     

    Fixed

    • Generate debug report before deleting broken prefix directory after bootstrap second stage failure to get stat info at time of failure. (7f632cf4)

    • Fully consume unknown CSI sequences containing unsupported parameter and intermediate bytes. Closes #4338. Co-authored-by: @krobelus and @agnostic-apollo. (3f237502)

    • Implement colon separated CSI parameters. (0415681d)

    • Make ScrollDown escape respect margins. Closes #2576. (4baf12ba)

    • Use Canvas.drawTextRun instead of drawText. drawText does (very) basic BiDi, which causes inconsistent behaviour. This ensures everything is LtR. (c1544076)

    • Mark view as important for AutoFill before requesting an AutoFill. Co-authored-by: @AChep and @agnostic-apollo. (ee9b31a0)

    • Parse (but ignore for now) terminal APC sequences. (f35063da)

    • Fix SHIFT+PAGE_UP and SHIFT+PAGE_DOWN behaviour to scroll 1 line of scr

  5. v0.119.0-beta.1pre-release2024-06-18 · 2024-06-18 00:11 UTC
    查看更新说明

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Termux application

    Build status Testing status Join the chat at https://gitter.im/termux/termux Join the Termux discord server Termux library releases at Jitpack

    Termux is an Android terminal application and Linux environment.

    Note that this repository is for the app itself (the user interface and the terminal emulation). For the packages installable inside the app, see termux/termux-packages.

    Quick how-to about Termux package management is available at Package Management. It also has info on how to fix repository is under maintenance or down errors when running apt or pkg commands.

    We are looking for Termux Android application maintainers.


    NOTICE: Termux may be unstable on Android 12+. Android OS will kill any (phantom) processes greater than 32 (limit is for all apps combined) and also kill any processes using excessive CPU. You may get [Process completed (signal 9) - press Enter] message in the terminal without actually exiting the shell process yourself. Check the related issue #2366, issue tracker, phantom cached and empty processes docs and this TLDR comment on how to disable trimming of phantom and excessive cpu usage processes. A proper docs page will be added later. An option to disable the killing should be available in Android 12L or 13, so upgrade at your own risk if you are on Android 11, specially if you are not rooted.


    Contents

    Termux App and Plugins

    The core Termux app comes with the following optional plugin apps.

    Installation

    Latest version is v0.118.3.

    NOTICE: It is highly recommended that you update to v0.118.0 or higher ASAP for various bug fixes, including a critical world-readable vulnerability reported here. See below for information regarding Termux on Google Play.

    Termux can be obtained through various sources listed below for only Android >= 7 with full support for apps and packages.

    Support for both app and packages was dropped for Android 5 and 6 on 2020-01-01 at v0.83, however it was re-added just for the app without any support for package updates on 2022-05-24 via the GitHub sources. Check here for the details.

    The APK files of different sources are signed with different signature keys. The Termux app and all its plugins use the same sharedUserId com.termux and so all their APKs installed on a device must have been signed with the same signature key to work together and so they must all be installed from the same source. Do not attempt to mix them together, i.e do not try to install an app or plugin from F-Droid and another one from a different source like GitHub. Android Package Manager will also normally not allow installation of APKs with different signatures and you will get errors on installation like App not installed, Failed to install due to an unknown error, INSTALL_FAILED_UPDATE_INCOMPATIBLE, INSTALL_FAILED_SHARED_USER_INCOMPATIBLE, signatures do not match previously installed version, etc. This restriction can be bypassed with root or with custom roms.

    If you wish to install from a different source, then you must uninstall any and all existing Termux or its plugin app APKs from your device first, then install all new APKs from the same new source. Check Uninstallation section for details. You may also want to consider Backing up Termux before the uninstallation so that you can restore it after re-installing from Termux different source.

    In the following paragraphs, "bootstrap" refers to the minimal packages that are shipped with the termux-app itself to start a working shell environment. Its zips are built and released here.

    F-Droid

    Termux application can be obtained from F-Droid from here.

    You do not need to download the F-Droid app (via the Download F-Droid link) to install Termux. You can download the Termux APK directly from the site by clicking the Download APK link at the bottom of each version section.

    It usually takes a few days (or even a week or more) for updates to be available on F-Droid once an update has been released on GitHub. The F-Droid releases are built and published by F-Droid once they detect a new GitHub release. The Termux maintainers do not have any control over the building and publishing of the Termux apps on F-Droid. Moreover, the Termux maintainers also do not have access to the APK signing keys of F-Droid releases, so we cannot release an APK ourselves on GitHub that would be compatible with F-Droid releases.

    The F-Droid app often may not notify you of updates and you will manually have to do a pull down swipe action in the Updates tab of the app for it to check updates. Make sure battery optimizations are disabled for the app, check https://dontkillmyapp.com/ for details on how to do that.

    Only a universal APK is released, which will work on all supported architectures. The APK and bootstrap installation size will be ~180MB. F-Droid does not support architecture specific APKs.

    GitHub

    Termux application can be obtained on GitHub either from GitHub Releases for version >= 0.118.0 or from GitHub Build Action workflows. For android >= 7, only install apt-android-7 variants. For android 5 and 6, only install apt-android-5 variants.

    The APKs for GitHub Releases will be listed under Assets drop-down of a release. These are automatically attached when a new version is released.

    The APKs for GitHub Build action workflows will be listed under Artifacts section of a workflow run. These are created for each commit/push done to the repository and can be used by users who don't want to wait for releases and want to try out the latest features immediately or want to test their pull requests. Note that for action workflows, you need to be logged into a GitHub account for the Artifacts links to be enabled/clickable. If you are using the GitHub app, then make sure to open workflow link in a browser like Chrome or Firefox that has your GitHub account logged in since the in-app browser may not be logged in.

    The APKs for both of these are debuggable and are compatible with each other but they are not compatible with other sources.

    Both universal and architecture specific APKs are released. The APK and bootstrap installation size will be ~180MB if using universal and ~120MB if using architecture specific. Check here for details.

    Security warning: APK files on GitHub are signed with a test key that has been shared with community. This IS NOT an official developer key and everyone can use it to generate releases for own testing. Be very careful when using Termux GitHub builds obtained elsewhere except https://github.com/termux/termux-app. Everyone is able to use it to forge a malicious Termux update installable over the GitHub build. Think twice about installing Termux builds distributed via Telegram or other social media. If your device get caught by malware, we will not be able to help you.

    The test key shall not be used to impersonate @termux and can't be used for this anyway. This key is not trusted by us and it is quite easy to detect its use in user generated content.

    Alias name: alias
    Creation date: Oct 4, 2019
    Entry type: PrivateKeyEntry
    Certificate chain length: 1
    Certificate[1]:
    Owner: CN=APK Signer, OU=Earth, O=Earth
    Issuer: CN=APK Signer, OU=Earth, O=Earth
    Serial number: 29be297b
    Valid from: Wed Sep 04 02:03:24 EEST 2019 until: Tue Oct 26 02:03:24 EEST 2049
    Certificate fingerprints:
             SHA1: 51:79:55:EA:BF:69:FC:05:7C:41:C7:D3:79:DB:BC:EF:20:AD:85:F2
             SHA256: B6:DA:01:48:0E:EF:D5:FB:F2:CD:37:71:B8:D1:02:1E:C7:91:30:4B:DD:6C:4B:F4:1D:3F:AA:BA:D4:8E:E5:E1
    Signature algorithm name: SHA1withRSA (disabled)
    Subject Public Key Algorithm: 2048-bit RSA key
    Version: 3
    

    Google Play Store (Experimental branch)

    There is currently a build of Termux available on Google Play for Android 11+ devices, with extensive adjustments in order to pass policy requirements there. This is under development and has missing functionality and bugs (see here for status updates) compared to the stable F-Droid build, which is why most users who can should still use F-Droid or GitHub build as mentioned above.

    Currently, Google Play will try to update installations away from F-Droid ones. Updating will still fail as sharedUserId has been removed. A planned 0.118.1 F-Droid release will fix this by setting a higher version code than used for the PlayStore app. Meanwhile, to prevent Google Play from attempting to download and then fail to install the Google Play releases over existing installations, you can open the Termux apps pages on Google Play and then click on the 3 dots options button in the top right and then disable the Enable auto update toggle. However, the Termux apps updates will still show in the PlayStore app updates list.

    If you want to help out with testing the Google Play build (or cannot install Termux from other sources), be aware that it's built from a separate repository (https://github.com/termux-play-store/) - be sure to report issues there, as any issues encountered might very well be specific to that repository.

    Uninstallation

    Uninstallation may be required if a user doesn't want Termux installed in their device anymore or is switching to a different install source. You may also want to consider Backing up Termux before the uninstallation.

    To uninstall Termux completely, you must uninstall any and all existing Termux or its plugin app APKs listed in Termux App and Plugins.

    Go to Android Settings -> Applications and then look for those apps. You can also use the search feature if it’s available on your device and search termux in the applications list.

    Even if you think you have not installed any of the plugins, it's strongly suggested to go through the application list in Android settings and double-check.

    Important Links

    Community

    All community links are available here.

    The main ones are the following.

    Wikis

    Miscellaneous

    Terminal

    Terminal resources

    Terminal emulators

    Debugging

    You can help debug problems of the Termux app and its plugins by setting appropriate logcat Log Level in Termux app settings -> <APP_NAME> -> Debugging -> Log Level (Requires Termux app version >= 0.118.0). The Log Level defaults to Normal and log level Verbose currently logs additional information. Its best to revert log level to Normal after you have finished debugging since private data may otherwise be passed to logcat during normal operation and moreover, additional logging increases execution time.

    The plugin apps do not execute the commands themselves but send execution intents to Termux app, which has its own log level which can be set in Termux app settings -> Termux -> Debugging -> Log Level. So you must set log level for both Termux and the respective plugin app settings to get all the info.

    Once log levels have been set, you can run the logcat command in Termux app terminal to view the logs in realtime (Ctrl+c to stop) or use logcat -d > logcat.txt to take a dump of the log. You can also view the logs from a PC over ADB. For more information, check official android logcat guide here.

    Moreover, users can generate termux files stat info and logcat dump automatically too with terminal's long hold options menu More -> Report Issue option and selecting YES in the prompt shown to add debug info. This can be helpful for reporting and debugging other issues. If the report generated is too large, then Save To File option in context menu (3 dots on top right) of ReportActivity can be used and the file viewed/shared instead.

    Users must post complete report (optionally without sensitive info) when reporting issues. Issues opened with (partial) screenshots of error reports instead of text will likely be automatically closed/deleted.

    Log Levels
    • Off - Log nothing.
    • Normal - Start logging error, warn and info messages and stacktraces.
    • Debug - Start logging debug messages.
    • Verbose - Start logging verbose messages.

    For Maintainers and Contributors

    The termux-shared library was added in v0.109. It defines shared constants and utils of the Termux app and its plugins. It was created to allow for the removal of all hardcoded paths in the Termux app. Some of the termux plugins are using this as well and rest will in future. If you are contributing code that is using a constant or a util that may be shared, then define it in termux-shared library if it currently doesn't exist and reference it from there. Update the relevant changelogs as well. Pull requests using hardcoded values will/should not be accepted. Termux app and plugin specific classes must be added under com.termux.shared.termux package and general classes outside it. The termux-shared LICENSE must also be checked and updated if necessary when contributing code. The licenses of any external library or code must be honoured.

    The main Termux constants are defined by TermuxConstants class. It also contains information on how to fork Termux or build it with your own package name. Changing the package name will require building the bootstrap zip packages and other packages with the new $PREFIX, check Building Packages for more info.

    Check Termux Libraries for how to import termux libraries in plugin apps and Forking and Local Development for how to update termux libraries for plugins.

    The versionName in build.gradle files of Termux and its plugin apps must follow the semantic version 2.0.0 spec in the format major.minor.patch(-prerelease)(+buildmetadata). When bumping versionName in build.gradle files and when creating a tag for new releases on GitHub, make sure to include the patch number as well, like v0.1.0 instead of just v0.1. The build.gradle files and attach_debug_apks_to_release workflow validates the version as well and the build/attachment will fail if versionName does not follow the spec.

    Commit Messages Guidelines

    Commit messages must use the Conventional Commits spec so that chagelogs as per the Keep a Changelog spec can automatically be generated by the create-conventional-changelog script, check its repo for further details on the spec. The first letter for type and description must be capital and description should be in the present tense. The space after the colon : is necessary. For a breaking change, add an exclamation mark ! before the colon :, so that it is highlighted in the chagelog automatically.

    <type>[optional scope]: <description>
    
    [optional body]
    
    [optional footer(s)]
    

    Only the types listed below must be used exactly as they are used in the changelog headings. For example, Added: Add foo, Added|Fixed: Add foo and fix bar, Changed!: Change baz as a breaking change, etc. You can optionally add a scope as well, like Fixed(terminal): Fix some bug. Do not use anything else as type, like add instead of Added, etc.

    • Added for new features.
    • Changed for changes in existing functionality.
    • Deprecated for soon-to-be removed features.
    • Removed for now removed features.
    • Fixed for any bug fixes.
    • Security in case of vulnerabilities.

    Forking

    • Check TermuxConstants javadocs for instructions on what changes to make in the app to change package name.
    • You also need to recompile bootstrap zip for the new package name. Check building bootstrap, here and here.
    • Currently, not all plugins use TermuxConstants from termux-shared library and have hardcoded com.termux values and will need to be manually patched.
    • If forking termux plugins, check Forking and Local Development for info on how to use termux libraries for plugins.

    Sponsors and Funders


    GitHub Accelerator (1)

     


    GitHub Secure Open Source Fund (1, 2)

     


    NLnet NGI Mobifree (1, 2)

     


    Cloudflare (1)