GithubHelp home page GithubHelp logo

termux-install-linux's Introduction

前言简介

Termux 一键安装 Linux 脚本

灵感来源于 AnLinux 和 AndroNix。

这两个软件提供的脚本下载资源都在国外,而且安装的系统里面更新源也是国外的,再没有 vim 编辑器的情况下,只能手动 echo 写入源 很是难受,于是一气之下就自己写了这个脚本了,核心镜像文件的下载地址使用的是码云(心疼码云3秒钟)。

依赖安装

Termux 使用如下命令安装:

pkg install proot git python -y

基本使用

git clone https://github.com/sqlsec/termux-install-linux
cd termux-install-linux
python termux-linux-install.py

基本上可以直接上手,0 学习成本,用户输错了也没关系,因为国光我都考虑到了,用户想篡改我的网址我也想到了,除非你有点代码基础,否则不是白嫖党小白你想象的那样直接修改就可以了的!

Ubuntu

安装成功后,可以直接这样启动:

cd ~/Termux-Linux/Ubuntu
./start-ubuntu.sh

Kali

这个 Kali 是轻量级的,大家要安装完整的 Kali Nethunter 的话 ,可以参考我的 Termux 文章里面的操作细节: Termux 高级终端安装使用配置教程: Kali NetHunter

cd ~/Termux-Linux/Kali
./start-kali.sh

Debian

cd ~/Termux-Linux/Debian
./start-debian.sh

总结

本脚本不会经常更新,除非有重大使用问题,暂时不考虑增加新的操作系统了,也不考虑增加图形化桌面安装功能,随缘佛系更新。

termux-install-linux's People

Contributors

sqlsec avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

termux-install-linux's Issues

安装脚本的cent os里没有ps

这个是信息:
[root@localhost ~]# ps
Error: /proc must be mounted
To mount /proc at boot you need an /etc/fstab line like:
proc /proc proc defaults
In the meantime, run "mount proc /proc -t proc"
是我termux没配置好还是脚本有问题?

貌似启动sh中语法有问题

u0_a477@localhost ~> git clone https://github.com/sqlsec/termux-install-linux
Cloning into 'termux-install-linux'...
remote: Enumerating objects: 47, done.
remote: Counting objects: 100% (47/47), done.
remote: Compressing objects: 100% (32/32), done.
remote: Total 47 (delta 19), reused 37 (delta 13), pack-reused 0
Receiving objects: 100% (47/47), 415.42 KiB | 577.00 KiB/s, done.
Resolving deltas: 100% (19/19), done.
u0_a477@localhost ~> cd termux-install-linux
u0_a477@localhost ~/termux-install-linux (master)> python termux-linux-install.py

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

正在安装相关依赖包: screenfetch
Testing the available mirrors:
[] (10) https://packages-cf.termux.dev/apt/termux-main: ok
[
] (1) https://mirrors.cbrx.io/apt/termux/termux-main: ok
[] (1) https://mirror.bardia.tech/termux/termux-main: ok
[
] (1) https://linux.domainesia.com/applications/termux/termux-main: ok
[] (1) https://mirror.nevacloud.com/applications/termux/termux-main: ok
[
] (1) https://mirror.albony.xyz/termux/termux-main: ok
[] (1) https://mirror.textcord.xyz/termux/termux-main: bad
[
] (1) https://mirrors.njupt.edu.cn/termux/apt/termux-main: bad
[] (1) https://mirror.nyist.edu.cn/termux/apt/termux-main: ok
[
] (1) https://mirrors.cqupt.edu.cn/termux/apt/termux-main: ok
[] (1) https://mirror.sjtu.edu.cn/termux/termux-main/: ok
[
] (1) https://mirrors.bfsu.edu.cn/termux/apt/termux-main: ok
[] (1) https://mirrors.sau.edu.cn/termux/apt/termux-main: ok
[
] (1) https://mirrors.hit.edu.cn/termux/apt/termux-main: ok
[] (1) https://mirror.iscas.ac.cn/termux/apt/termux-main: ok
[
] (1) https://mirrors.dgut.edu.cn/termux/apt/termux-main: bad
[] (1) https://mirrors.aliyun.com/termux/termux-main: ok
[
] (1) https://mirrors.scau.edu.cn/termux/apt/termux-main: ok
[] (1) https://mirrors.sdu.edu.cn/termux/termux-main: ok
[
] (1) https://mirrors.sustech.edu.cn/termux/apt/termux-main: ok
[] (1) https://mirrors.nju.edu.cn/termux/apt/termux-main: ok
[
] (1) https://mirrors.pku.edu.cn/termux/termux-main/: ok
[] (1) https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main: ok
[
] (1) https://mirrors.ustc.edu.cn/termux/apt/termux-main: ok
[] (1) https://mirrors.zju.edu.cn/termux/apt/termux-main: ok
[
] (1) https://mirrors.sahilister.in/termux/termux-main: ok
[] (1) https://mirror.accum.se/mirror/termux.dev/termux-main: ok
[
] (1) https://termux.cdn.lumito.net/termux-main: ok
[] (4) https://grimler.se/termux/termux-main: ok
[
] (1) https://mirror.termux.dev/termux-main: bad
[] (1) https://termux.3san.dev/termux/termux-main: ok
[
] (1) https://is.mirror.flokinet.net/termux/termux-main: ok
[] (1) https://termux.astra.in.ua/apt/termux-main: ok
[
] (1) https://ro.mirror.flokinet.net/termux/termux-main: ok
[] (1) https://ftp.fau.de/termux/termux-main: ok
[
] (1) https://termux.mentality.rip/termux-main: ok
[] (1) https://md.mirrors.hacktegic.com/termux/termux-main: ok
[
] (1) https://termux.librehat.com/apt/termux-main: ok
[] (1) https://packages.termux.dev/apt/termux-main: ok
[
] (1) https://mirror.mwt.me/termux/main: ok
[] (1) https://mirrors.medzik.dev/termux/termux-main: ok
[
] (1) https://mirrors.cfe.re/termux/termux-main: bad
[] (1) https://mirror.sunred.org/termux/termux-main: ok
[
] (1) https://mirror.fcix.net/termux/termux-main: ok
[] (1) https://mirror.quantum5.ca/termux/termux-main: ok
[
] (1) https://mirror.vern.cc/termux/termux-main: ok
[] (1) https://mirror.csclub.uwaterloo.ca/termux/termux-main: ok
[
] (1) https://dl.kcubeterm.com/termux-main: bad
[] (1) https://plug-mirror.rcac.purdue.edu/termux/termux-main: ok
[
] (1) https://mirrors.utermux.dev/termux/termux-main: ok
[] (1) https://mirror.mwt.me/termux/main: ok
[
] (1) https://mirror.surf/termux/termux-main/: ok
[*] (1) http://mirror.mephi.ru/termux/termux-main: ok
Picking mirror: (33) /data/data/com.termux/files/usr/etc/termux/mirrors/europe/termux.cdn.lumito.net
Hit:1 https://packages.termux.dev/apt/termux-games games InRelease
Get:3 https://termux.cdn.lumito.net/termux-main stable InRelease [14.0 kB]
Hit:2 https://packages.termux.dev/apt/termux-science science InRelease
Get:4 https://termux.cdn.lumito.net/termux-x11 x11 InRelease [14.0 kB]
Get:5 https://termux.cdn.lumito.net/termux-main stable/main aarch64 Packages [496 kB]
Get:6 https://termux.cdn.lumito.net/termux-x11 x11/main aarch64 Packages [127 kB]
Fetched 651 kB in 11s (58.4 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
32 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
screenfetch
0 upgraded, 1 newly installed, 0 to remove and 32 not upgraded.
Need to get 50.6 kB of archives.
After this operation, 299 kB of additional disk space will be used.
Get:1 https://termux.cdn.lumito.net/termux-main stable/main aarch64 screenfetch all 3.9.1-1 [50.6 kB]
Fetched 50.6 kB in 2s (26.7 kB/s)
Selecting previously unselected package screenfetch.
(Reading database ... 28978 files and directories currently installed.)
Preparing to unpack .../screenfetch_3.9.1-1_all.deb ...
Unpacking screenfetch (3.9.1-1) ...
Setting up screenfetch (3.9.1-1) ...
Processing triggers for man (1.14.6-1) ...


|_ |_ _ __ _ __ ___ _ ___ __
| |/ _ \ '__| '_ ` _ | | | \ / /
| | / | | | | | | | || |> <
|
|_
|| || || ||_,/_/_\

Termux 高级终端安装使用配置教程

https://www.sqlsec.com/2018/05/termux.html

  1. 安装 Ubuntu 2. 卸载 Ubuntu
  2. 安装 Kali 4. 卸载 Kali
  3. 安装 Debian 6. 卸载 Debian
  4. 安装 CentOS 8. 卸载 CentOS
  5. 安装 Fedora 10. 卸载 Fedora
  6. 查询已安装系统 12. 退出脚本

请选择要执行的操作: 3

正在从码云下载 Rootfs 镜像文件,请耐心等待
Cloning into 'termux-kali'...
remote: Enumerating objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 3
Receiving objects: 100% (3/3), 79.08 MiB | 687.00 KiB/s, done.

下载完成 看来国内码云的速度还是可以的 2333

正在解压镜像 请耐心等待

解压完成 正在删除已下载的镜像

正在优化系统设置
..............
..,;:ccc,.
......''';lxO.
.....''''..........,:ld;
.';;;:::;,,.x,
..'''. 0Xxoc:,. ...
.... ,ONkc;,;cokOdc',.
. OMo ':ddo.
dMc :OO;
0M. .:o.
;Wd
;XO,
,d0Odlc;,..
..',;:cdOOd::,.
.:d;.':;.
'd, .'
;l ..
.o
c
.'
.

Kali 安装成功

祝您使用愉快

u0_a477@localhost ~/termux-install-linux (master)> cd ../
u0_a477@localhost ~> cd Termux-Linux/Kali/
u0_a477@localhost ~/T/Kali> ll
total 11K
drwx------ 2 u0_a477 u0_a477 3.5K Nov 24 23:54 binds/
drwx------ 17 u0_a477 u0_a477 3.5K Nov 24 23:54 kali-fs/
-rwx------ 1 u0_a477 u0_a477 924 Nov 24 23:54 start-kali.sh*
u0_a477@localhost ~/T/Kali> sh start-kali.sh
start-kali.sh: 6: command+= --link2symlink: not found
start-kali.sh: 7: command+= -0: not found
start-kali.sh: 8: command+= -r kali-fs: not found
start-kali.sh: 14: command+= -b /dev: not found
start-kali.sh: 15: command+= -b /proc: not found
start-kali.sh: 16: command+= -b kali-fs/root:/dev/shm: not found
start-kali.sh: 21: command+= -w /root: not found
start-kali.sh: 22: command+= /usr/bin/env -i: not found
start-kali.sh: 23: command+= HOME=/root: not found
start-kali.sh: 24: command+= PATH=/usr/local/sbin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/games:/usr/local/games: not found
start-kali.sh: 25: command+= TERM=xterm-256color: not found
start-kali.sh: 26: command+= LANG=C.UTF-8: not found
start-kali.sh: 27: command+= /bin/bash --login: not found
Usage:
proot [option] ... [command]

Regular options:
-r path Use path as the new guest root file-system, default is /.
-b path Make the content of path accessible in the guest rootfs.
-q command Execute guest programs through QEMU as specified by command.
-w path Set the initial working directory to path.
--kill-on-exit Kill all processes on command exit.
-v value Set the level of debug information to value.
-V Print version, copyright, license and contact, then exit.
-h Print the version and the command-line usage, then exit.

Extension options:
-k string Make current kernel appear as kernel release string.
-0 Make current user appear as "root" and fake its privileges.
-i string Make current user and group appear as string "uid:gid".
--link2symlink Replace hard links with symlinks, pretending they are really hardlinks
--sysvipc Handle System V IPC syscalls in proot
--ashmem-memfd Emulate memfd_create support through ashmem and simulate fstat.st_size for ashmem
-H Hide files and directories starting with '.proot.' .
-p Modify bindings to protected ports to use a higher port number.
-L Correct the size returned from lstat for symbolic links.

Alias options:
-R path Alias: -r path + a couple of recommended -b.
-S path Alias: -0 -r path + a couple of recommended -b.
fatal error: see proot --help.

启动ubuntu时报错

启动ubuntu时报错(./start-ubuntu.sh),错误信息如下:

proot warning: can't sanitize binding "ubuntu-fs/root": No such file or directory
proot warning: can't chdir("/root/.") in the guest rootfs: No such file or directory
proot info: default working directory is now "/"
proot error: '/usr/bin/env' not found (root = /data/data/com.termux/files/home/Termux-Linux/Ubuntu/ubuntu-fs, cwd = /, $PATH=(null))
fatal error: see proot --help.

contos系统权限问题

大佬,我是个小菜鸡。安装启动contos系统后,默认root用户,但是操作contos系统下的文件会提示权限不足。。。是我的姿势不对吗

系统可以正常安装,但无法运行

一运行就报错:

$ ./start-ubuntu.sh
ls: cannot access 'binds': No such file or directory
proot warning: can't sanitize binding "ubuntu-fs": No such file or directory
fatal error: see `proot --help`.

no such file or directory

~/Termux-Linux $ cd Ubuntu
~/Termux-Linux/Ubuntu $ ./start-ubuntu.sh
proot warning: can't sanitize binding "ubuntu-fs/root": No such file or directory
proot warning: can't chdir("/root/.") in the guest rootfs: No such file or directory
proot info: default working directory is now "/"
proot error: '/usr/bin/env' not found (root = /data/data/com.termux/files/home/Termux-Linux/Ubuntu/ubuntu-fs, cwd = /, $PATH=(null))
fatal error: see proot --help.

Failed to get D-Bus connection: Operation not permitted

系统内systemctl无法使用,无法启动后台服务,请问这个安装的系统是类docker那样的吗,产生的镜像不允许在容器内运行后台服务。

[root@localhost ~]# docker info
Client:
 Debug Mode: false

Server:
ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
errors pretty printing info
[root@localhost ~]# systemctl start docker
Failed to get D-Bus connection: Operation not permitted

proot error

’/home/Termux-Linux/Ubuntu/ubuntu-fs/usr/bin/env’ is a 64-bit program whereas this version of proot handles 32-bit programs only

Prior info :vpid 1: terminated with signal 4

安卓了Centos运行不起来

proot error: '/data/data/com.termux/files/home/Termux-Linux/CentOS/centos-fs/usr/bin/env' is a 64-bit program whereas this version of proot handles 32-bit programs only

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.