What's new
  • Welcome to PHCorner forums. Take a moment to sign up and gain unlimited access and extra privileges that guests are not entitled to, such as: All that and more! Registration is quick, simple and absolutely free. Join our community today!

Tutorial Termux Tutorial(Complete guide kung kakayanin)

Sore-Scythe

Established
Joined
Jun 9, 2017
Messages
89
Reaction
144
Termux information
Termux is an Android terminal emulator and Linux environment app that works directly with no rooting or setup required. A minimal base system is installed automatically - additional packages are available using the APT package manager.

basically ini-emulate nya ang terminal which is the command line kung saan ka nagta-type ng mga commands.
Halos full blown environment na sya ngayon pero
may compatibility issues pag marshmallow and below ang gamit mo dahil di na officially supported ang android version
list of possible na gawin
run vs-code server
medyo limited na python programming
nodejs servers At apps
automation via script
Marami pang iba explore lang kayo

Basic Installation
for marshmallow and lollipop download termux-v0.79-offline-bootstraps.apk and termux-api-git-debug.apk
You do not have permission to view the full content of this post. Log in or register now.
for android nougat and above download termux and termux-api
You do not have permission to view the full content of this post. Log in or register now.
1. Install both apps
2. Open termux app
3. Type command 1 then enter command 2 and so on
Command:
pkg update
pkg upgrade
termux-setup-storage
4. install basic stuff
Command:
pkg install wget termux-tools termux-api bash-completion

Basic commands

1. pwd to print kung nasaang directory(folder) ka
Command:
pwd
output nyan ay "/data/data/com.termux/files/home"

2. cd to change directory
example
Command:
cd /sdcard
pwd
output nyan ay "/sdcard' dahil nasa /sdcard ka na

3. ls to list files and folders
pag walang kasunod ang ls sa current directory ang ililista nyan
example
Command:
ls

pag sa /sdcard naman ililista mo
Command:
ls /sdcard

output nyan ay mga pangalan
filetypes by color
blue = folder
white = file
green = file na pwedeng i iexecute

4. wget to download files from link
example:
Command:
wget https://raw.githubusercontent.com/SoreScythe/wuxianxia-crawler/main/wuxianxia
you can also set a custom filename para sa download
example
Command:
wget https://raw.githubusercontent.com/SoreScythe/wuxianxia-crawler/main/wuxianxia -O panget.py

5. cp to copy to files from path
example
to copy file to sdcard
Command:
cp wuxianxia /sdcard/
to copy file to sdcard with a different name
Command:
cp wuxianxia /sdcard/pangetmo.py
To copy folder
Take note sa '/' sa dulo ng path
Pag di nyo nalagay yan baka magkalat files nyo
Command:
cp -r ~/.config /sdcard/
cp -r ~/.config /sdcard/directory_name_na_gusto_mo

6. rm to delete a file or folder
To remove a file
Command:
rm filename
rm /sdcard/pangetmo.py
To remove a folder or directory
Command:
rm -r /sdcard/sampledirectoryname
Ingat sa pag rm since di mo na mababalik ang deleted na files

Special Keyword
paths:
~ = /data/data/com.termux/files/home
$HOME = same as above
/sdcard = internal storage
$PREFIX = /data/data/com.termux/files/usr

para naman sa path sdcard(memory card)
run
Command:
ls /storage
tignan nyo sa output nyan yung may "-" ang pangalan
then idugtong nyo lang sa "/storage/"
example
Command:
cd /storage/BB80-151C
ls

Package management
ang package manager natin sa termux ay apt at pkg

Use pkg para laging updated ang list ng available programs na pwede mo i-install

Example to install fd
Command:
pkg install fd

To remove fd
Command:
pkg remove fd

To show info about fd
Command:
pkg show fd

same din sa apt, ang advantage lang ay di mo na kailangan ng net unless mag-iinstall ka ng package na di mo pa nai-install dati
example

Para i install ang fd
Command:
apt install fd
Di na yan magda-download ulit dahil naka-save na ang installation file ng fd

pag wala ka net pang-install search ka muna ng mga program na trip mo
Example
Command:
apt search audio
apt search image
apt search python

Self learning
para makita mo mga possible na option ng commands use "--help" or "-h"
Example:
Command:
ls --help
mv --help
apt -h

Para makita mo naman ang mga commands na pwede mo gamitin
Command:
ls $PREFIX/bin
type mo lang name ng command tapos dugtungan mo ng '--help' or '-h'
Pag di gumana ang ''--help" or "-h" then use "man"
bago mo sya magamit kailangan mo sya i-install
Command:
pkg install man
or
Command:
apt install man
then run "man package_name"
Example
Command:
man ls
man apt
man mv
Press q lang para ma-exit ang man page
up and down naman para paggalaw sa page

VS-code server(via local hotspot)
NEED INTERNET
not recommended kung sa phone mo lang gagamitin dahil may keyboard issues pag sa android browser
Note: last test ko nito sa marshmallow and below ay noong 2016-17 pa so di ako sure kung gagana pa sya


Working sa nougat and above

Need nito ng medyo malakas na specs at minimum na 2gb ram at storage (pero gumana to sa huawei honor ko dati na 1gb ram lang)

okay ito kung meron kang lumang laptop, may intel atom ako na kakainstall lang ng lubuntu since sobrang mamaw ni windows10,
Ito ngayon ginagamit ko pag practice ng programming
Note: install häçkers keyboard para madalian ka

To install code-server run
Command:
pkg install nodejs
pkg install yarn
pkg install build-essential python git
After nyan ay last command para sa installation ng code-server
Command:
yarn global add code-server
Medyo matagal yan kaya browse ka muna kung di naglag phone mo

pagkatapos nyan ayusin muna ang ang search functionality
Command:
pkg install ripgrep
Then
Command:
cd /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server
ln -s $PREFIX/bin/rg ./lib/vscode/node_modules/vscode-ripgrep/bin/rg
run code server
Command:
code-server --auth none
open browser go to You do not have permission to view the full content of this post. Log in or register now.
Para patayin ang server press ctrl tapos c

Para gumana sya sa hotspot edit mo muna ang config nya
Install text editor
Command:
pkg install micro
Then
Command:
micro ~/.config/code-server/config.yaml
Edit mo yung "127.0.0.1" gawin mong "192.168.43.1"
then press ctrl tapos s
Then ctrl tapos q
Open hotspot Tapos run mo ulit
Command:
code-server --auth none

received_3722951897786421.jpeg
Micro Text editor
madaming text editor si termux pero ito yung pinakamadaling gamitin

To install run
Command:
pkg install micro

para mag edit ng file use
Command:
micro filename
Pag walang file, gagawa si micro ng blank na file

Shortcuts
Command:
ctrl+q para iclose ang file (exit pag isa lang nakabukas na file)
ctrl+s para isave ang file
ctrl+e para buksan ang commandline ng micro
ctrl+g para buksan ang help text

Learning resources

Python
You do not have permission to view the full content of this post. Log in or register now.
You do not have permission to view the full content of this post. Log in or register now.

MISC
You do not have permission to view the full content of this post. Log in or register now.
 

Attachments

Last edited:
Saan makakakita ng mga pwedeng gawin sa termux maliban sa mga website na na google???
 
1 Comment
S
Sore-Scythe
madalas ko puntahan ay github kaso kailangan alamin mo muna kung ano gusto mo gawin, for example mahilig ako magbasa ng novels kaso tinatamad ako magbrowse ng per chapter at madalas din mawalan ng net, naghahanap ako ng program(novel scraper) na nagda-download ng lahat ng chapter ng novel. search ko lang "novel scraper" sa github....

pro tip: pag sa google ka maghahanap ganto gawin mo
kunyari naghahanap ka ng batch compress script/program para sa mga images.

search mo sa google "batch image compress linux" or "linux batch compress image"
marami na lalabas jan isa-isahin mo lang hanggang gumana
 

Online statistics

Members online
1,953
Guests online
2,605
Total visitors
4,558

Forum statistics

Threads
1,044,621
Messages
17,785,930
Members
1,503,931
Comments
889,966
Attachments
1,332,237
Profile posts
97,092
Top