Record Termux の installation process

Hatsukarada验 of Termux

Foreword

installationTermuxMainly to write Python using a mobile phone, of course, you can useQPythonas well asPydroidTo write, in fact, I was more of the recommended Pydroid. Although these two are sufficient to meet my daily learning needs, but charming nonetheless Termux too ^ _ ^

(1 •. • 1) This article is purely for the record, to facilitate their installation again later
for more detailed tutorial can refer to these two articles, I was installed in accordance with these two tutorial

Author: Guoguang ㅤ ㅤ Termux advanced terminal installation Configuration Tutorial
Author: P3TERX Termux Tutorial # 2 - build the strongest terminal on the phone

Download Link

Termux Wiki Download Termux have its plug-in F-Droid platform

Replace domestic sources

The default software sources are generally slower than download, so after the installation is complete, the first thing to change is the natural source of it.

First set the default editor

export EDITOR=vi

Edit the source file

apt edit-sources

The original official source https://termux.org/packages/ replaced
Tsinghua source http://mirrors.tuna.tsinghua.edu.cn/termux or
USTC source https://mirrors.ustc.edu.cn/termux Tsinghua recommended source
and preceded by [arch = all, your platform architecture]

# The main termux repository:
#deb https://termux.org/packages/ stable main
deb [arch=all,aarch64] https://mirrors.tuna.tsinghua.edu.cn/termux stable main

Sed command or a key to modify the

sed -i 's@^\(deb.*stable main\)$@#\1\ndeb [arch=all,aarch64] https://mirrors.tuna.tsinghua.edu.cn/termux stable main@' $PREFIX/etc/apt/sources.list

Check for Modifications

cat $PREFIX/etc/apt/sources.list

Updates about the source

pkg up -y

If the card is a progress bar, exit Termux process, reopen and run dpkg --configure -a can be repaired.

Mounting base / common tools

The first time you use Termux feel especially difficult to use is not convenient, as if just paid a 18-year-old girlfriend, not cosmetic and will not cooperate, then we supposed to do, and that our only slowly "taught" she lo (ง • _ •) ง

Some basic tools

pkg i -y vim curl wget git unzip unrar 

Installation and Configuration Oh My Zsh

Oh My Zsh of auto-suggestion, highlighting and code completion, can greatly improve the efficiency of input terminals.

Zsh installation with Oh My Zsh

Use one-click installation scripts to install zsh and oh-my-zsh zsh as the default shell and set the theme and modify the font color

sh -c "$(curl -fsSL https://github.com/Cabbagec/termux-ohmyzsh/raw/master/install.sh)"  

If the above script error 443 can not access the network or on the exchange has been repeatedly performed
555 on the card I was here for a long time

Installation will let you enter numbers to select the font color with
the color I chose11.flat, font is6.FiraCode-Regular

Want to try other options, of course, you can also choose to re-run the script

 ~/termux-ohmyzsh/install.sh

But can also install Termux: Styling the plug-in, press the screen after installation, enter the More ... menu, select the Style you can set the color and font.

Modify Oh My Zsh theme

~ / .Oh-my-zsh / themes stood all documents oh-my-zsh under the themes directory

The default theme is "agnoster"But I still prefer"ys"This theme
using the sed command to directly modify

sed -i '/^ZSH_THEME=/c\ZSH_THEME="ys"' ~/.zshrc

You can also use vim to edit the configuration file

vim ~/.zshrc

After modification using a source close Termux refresh configuration or reopen the entry into force

source ~/.zshrc

Termux theme font color

Modify the startup greeting

Edit greeting file will be able to directly modify greeting

vim $PREFIX/etc/motd
Published an original article · won praise 0 · Views 12

Guess you like

Origin blog.csdn.net/weixin_37637489/article/details/104090764