Watch the video * Watch the video *
const http = require('http'); http.createServer((req, res) => res.end('Hello Termux!'); ).listen(8080); pkg install clang nano hello.c #include <stdio.h> int main() printf("Hello\n"); return 0; clang hello.c -o hello ./hello 5.4 Go, Rust, Ruby, Perl, PHP pkg install golang rust ruby perl php 🛠️ Module 6: Advanced Termux Features 6.1 API Access (Hardware) Install Termux:API app + package:
#!/bin/bash echo "Hello from Termux!" Run:
export PS1="\[\e[32m\]\u@\h\[\e[0m\]:\[\e[34m\]\w\[\e[0m\]\$ " alias ll='ls -la' alias update='pkg update && pkg upgrade' 7.3 Extra Keys Row Edit ~/.termux/termux.properties :
pkg install termux-api Examples:
bash hello.sh 4.1 Check Network ifconfig ping google.com curl ifconfig.me # public IP 4.2 Download Files wget https://example.com/file.zip curl -O https://example.com/file.zip 4.3 SSH into Termux Install OpenSSH:
extra-keys = [['ESC','/','-','HOME','UP','END'],['TAB','CTRL','ALT','LEFT','DOWN','RIGHT']] Reload:
import requests r = requests.get('https://api.github.com') print(r.status_code) pkg install nodejs node -v npm -v Example server.js :
const http = require('http'); http.createServer((req, res) => res.end('Hello Termux!'); ).listen(8080); pkg install clang nano hello.c #include <stdio.h> int main() printf("Hello\n"); return 0; clang hello.c -o hello ./hello 5.4 Go, Rust, Ruby, Perl, PHP pkg install golang rust ruby perl php 🛠️ Module 6: Advanced Termux Features 6.1 API Access (Hardware) Install Termux:API app + package:
#!/bin/bash echo "Hello from Termux!" Run:
export PS1="\[\e[32m\]\u@\h\[\e[0m\]:\[\e[34m\]\w\[\e[0m\]\$ " alias ll='ls -la' alias update='pkg update && pkg upgrade' 7.3 Extra Keys Row Edit ~/.termux/termux.properties :
pkg install termux-api Examples:
bash hello.sh 4.1 Check Network ifconfig ping google.com curl ifconfig.me # public IP 4.2 Download Files wget https://example.com/file.zip curl -O https://example.com/file.zip 4.3 SSH into Termux Install OpenSSH:
extra-keys = [['ESC','/','-','HOME','UP','END'],['TAB','CTRL','ALT','LEFT','DOWN','RIGHT']] Reload:
import requests r = requests.get('https://api.github.com') print(r.status_code) pkg install nodejs node -v npm -v Example server.js :