# Built-in Terminal

The built-in terminal is one of the most commonly used features in FIRERPA. You can connect to the built-in terminal to execute commands in real time. The built-in terminal refers to the terminal accessed via remote desktop, SSH, or built-in ADB. It includes pre-installed commands and some commonly used Python modules, allowing you to execute commands or run Python code directly, enabling self-control directly in the terminal.

```{attention}
For compatibility and security reasons, terminals connected via built-in ADB do not support features such as partial command hinting.
```

Now please open the remote desktop or connect to SSH or built-in ADB terminal; you should see a Linux terminal. Execute the command `cd` to switch to the home directory, which is your workspace where you can store files. The terminal supports command completion but not argument completion. You can also type part of a command and then use the up and down arrow keys to auto-complete historical commands.

## Common Aliases

Aliases are similar to commands, allowing you to quickly execute some commonly used commands. The following command aliases are available in the built-in terminal, along with their functions.

| Abbreviation | Command                     |
|--------------|-----------------------------|
| l            | ls                          |
| ll           | ls -l                       |
| la           | ls -la                      |
| py           | python                      |
| ..           | Switch to parent directory  |
| ...          | Switch to grandparent directory |
| t            | Switch to /data/local/tmp   |
| p            | Switch to previous directory |

## Common Commands

Common commands refer to some commonly used Linux or industry commands built into FIRERPA. The supported commands are as follows. Of course, besides the commands described below, most common Linux commands are also supported, but we will not list them exhaustively in the following table.
This environment comes with a rich set of pre-installed Linux command tools, covering common scenarios such as file operations, network communication, system debugging, and text processing. The complete list is as follows:

| Command | Description |
|---------|-------------|
| [ | Conditional test (linked to coreutils) |
| adb | Android Debug Bridge |
| awk | Text pattern scanning and processing language |
| b2sum | BLAKE2 checksum (linked to coreutils) |
| base32 | Base32 encode/decode (linked to coreutils) |
| base64 | Base64 encode/decode (linked to coreutils) |
| basename | Remove path prefix (linked to coreutils) |
| basenc | Multiple encoding conversions (linked to coreutils) |
| bash | Bourne Again Shell |
| cat | Concatenate and output files (linked to coreutils) |
| celery | Distributed task queue CLI |
| chcon | Modify SELinux context (linked to coreutils) |
| chgrp | Change file group (linked to coreutils) |
| chmod | Change file permissions (linked to coreutils) |
| chown | Change file owner (linked to coreutils) |
| chroot | Switch root directory (linked to coreutils) |
| cksum | Checksum calculation (linked to coreutils) |
| comm | Compare two sorted files (linked to coreutils) |
| coreutils | GNU core utilities |
| cp | Copy files (linked to coreutils) |
| crontab | Scheduled task management |
| csplit | Split files by pattern (linked to coreutils) |
| curl | HTTP/FTP command-line client |
| cut | Cut text by columns (linked to coreutils) |
| date | Date/time display/set (linked to coreutils) |
| dd | Data conversion and copy (linked to coreutils) |
| df | Disk space viewing (linked to coreutils) |
| dir | List directories (linked to coreutils) |
| dircolors | Directory color settings (linked to coreutils) |
| dirname | Get directory part (linked to coreutils) |
| dnsmasq | Lightweight DNS/DHCP service |
| du | Disk usage statistics (linked to coreutils) |
| echo | Output text (linked to coreutils) |
| env | Environment variable management (linked to coreutils) |
| expand | Convert tabs to spaces (linked to coreutils) |
| expr | Expression evaluation (linked to coreutils) |
| factor | Prime factorization (linked to coreutils) |
| false | Return non-zero status code (linked to coreutils) |
| fuser | Display process IDs using specified resources |
| find | File search tool |
| fmt | Text formatting (linked to coreutils) |
| fold | Wrap lines by width (linked to coreutils) |
| free | View memory usage |
| frpc | frp intranet penetration client |
| fsmon | File system monitor |
| grep | Text pattern search |
| groups | View user groups (linked to coreutils) |
| head | Output file head (linked to coreutils) |
| hexedit | Hex editor |
| htop | Interactive process viewer |
| id | User identity information (linked to coreutils) |
| ifconfig | Network interface configuration |
| ip | Network routing/tunnel/device management |
| iperf | Network bandwidth test (linked to iperf3) |
| iperf3 | Network bandwidth testing tool |
| join | Merge two sorted files (linked to coreutils) |
| kill | Send signal to terminate process |
| killall | Kill all processes by name |
| link | Create hard link (linked to coreutils) |
| ln | Create links (linked to coreutils) |
| logname | Current login username (linked to coreutils) |
| ls | List directory contents (linked to coreutils) |
| ltrace | Library function call trace |
| md5sum | MD5 checksum (linked to coreutils) |
| memdumper | Memory dump tool (32-bit) |
| memdumper64 | Memory dump tool (64-bit) |
| mkdir | Create directory (linked to coreutils) |
| mkfifo | Create named pipe (linked to coreutils) |
| mknod | Create device node (linked to coreutils) |
| mksh | MirBSD Korn Shell |
| mktemp | Create temporary file (linked to coreutils) |
| mv | Move/rename files (linked to coreutils) |
| nano | Simple text editor |
| nc | Netcat network tool |
| ncdu | Interactive disk usage viewer |
| nice | Adjust process priority (linked to coreutils) |
| nl | Add line numbers (linked to coreutils) |
| nohup | Run ignoring hangup signal (linked to coreutils) |
| nproc | View number of CPU cores (linked to coreutils) |
| numfmt | Number format conversion (linked to coreutils) |
| od | Octal/hex viewer (linked to coreutils) |
| openssl | SSL/TLS encryption tool |
| paste | Merge file lines (linked to coreutils) |
| pathchk | Pathname check (linked to coreutils) |
| pgrep | Find process PID by name |
| pidof | Get process PID |
| pinky | User information view (linked to coreutils) |
| pip | Python package installer |
| pkill | Terminate process by name |
| pr | Text pagination formatting (linked to coreutils) |
| printenv | Print environment variables (linked to coreutils) |
| printf | Formatted output (linked to coreutils) |
| ps | Process status view |
| pstree | Process tree view |
| ptx | Generate permuted index (linked to coreutils) |
| pwd | Current directory path (linked to coreutils) |
| pwdx | Query process working directory |
| python | Python interpreter (linked to python3.12) |
| python3 | Python 3 interpreter (linked to python3.12) |
| python3.12 | Python 3.12 interpreter |
| readlink | Read symbolic link target (linked to coreutils) |
| realpath | Resolve absolute path (linked to coreutils) |
| redir | Port redirect tool |
| rm | Delete files (linked to coreutils) |
| rmdir | Remove empty directory (linked to coreutils) |
| route | Routing table view/configure |
| rsync | Remote file synchronization |
| runcon | Run with SELinux context (linked to coreutils) |
| scapy | Python network packet CLI |
| scp | Secure file copy (SSH) |
| sed | Stream editor |
| seq | Generate numeric sequence (linked to coreutils) |
| sha1sum | SHA-1 checksum (linked to coreutils) |
| sha224sum | SHA-224 checksum (linked to coreutils) |
| sha256sum | SHA-256 checksum (linked to coreutils) |
| sha384sum | SHA-384 checksum (linked to coreutils) |
| sha512sum | SHA-512 checksum (linked to coreutils) |
| shelldo | Shell command execution tool |
| shred | Secure deletion overwrite (linked to coreutils) |
| shuf | Randomly permute lines (linked to coreutils) |
| sleep | Delay for specified time (linked to coreutils) |
| socat | Multi-purpose network tool (enhanced netcat) |
| sort | Sort (linked to coreutils) |
| split | Split files (linked to coreutils) |
| sqlite3 | SQLite database CLI |
| ssh | SSH client |
| stat | File status view (linked to coreutils) |
| stdbuf | Control buffers (linked to coreutils) |
| strace | System call trace |
| stty | Terminal settings (linked to coreutils) |
| stunnel | SSL tunnel wrapper |
| sum | File checksum (linked to coreutils) |
| sync | Sync disk buffers (linked to coreutils) |
| sysctl | Kernel parameters view/configure |
| tac | Output files in reverse (linked to coreutils) |
| tail | Output file tail (linked to coreutils) |
| tcpdump | Network packet capture and analysis |
| tee | Redirect and output (linked to coreutils) |
| test | Conditional test (linked to coreutils) |
| timeout | Run with timeout (linked to coreutils) |
| top | Real-time process monitoring |
| touch | Modify file timestamps (linked to coreutils) |
| tr | Character translation/deletion (linked to coreutils) |
| true | Return zero status code (linked to coreutils) |
| truncate | File size adjustment (linked to coreutils) |
| tsort | Topological sort (linked to coreutils) |
| tty | Terminal device name (linked to coreutils) |
| uname | System information (linked to coreutils) |
| unexpand | Convert spaces to tabs (linked to coreutils) |
| uniq | Deduplicate (linked to coreutils) |
| unlink | Delete file (linked to coreutils) |
| uptime | System uptime |
| vdir | Verbose directory listing (linked to coreutils) |
| vi | Text editor (linked to vim) |
| view | Vim read-only mode (linked to vim) |
| vim | Enhanced text editor |
| vimdiff | Vim file diff (linked to vim) |
| vmstat | Virtual memory/system statistics |
| watch | Execute command periodically |
| wc | Line/word/character count (linked to coreutils) |
| who | Current logged-in users (linked to coreutils) |
| whoami | Current username (linked to coreutils) |
| xargs | Build arguments from standard input and execute |
| yes | Repeat output (linked to coreutils) |

## Python Libraries

The pre-installed third-party libraries in this environment cover common fields such as network communication, encryption security, database connectivity/storage, message queues, image processing, system management, and asynchronous high-performance, ready to use out of the box.

| Library             | Version   | Description                         |
|---------------------|-----------|-------------------------------------|
| Brotli              | 1.2.0     | Brotli compression/decompression    |
| Jinja2              | 3.1.0     | Template engine                     |
| Pillow              | 8.0.0     | Image processing (PIL fork)         |
| PyMySQL             | 1.2.0     | MySQL database driver               |
| PyNaCl              | 1.6.2     | Encryption and signatures (NaCl wrapper) |
| PySocks             | 1.7.1     | SOCKS proxy client                  |
| PyYAML              | 6.0.2     | YAML parsing and generation         |
| amqp                | 5.3.1     | AMQP protocol client (RabbitMQ)     |
| async-timeout       | 5.0.0     | Async timeout control               |
| av                  | 17.0.0    | Audio/video processing (PyAV)       |
| bcrypt              | 3.2.0     | Password hashing (Blowfish)         |
| bidict              | 0.23.1    | Bidirectional dictionary data structure |
| cachetools          | 7.1.0     | Cache utilities                     |
| celery              | 5.5.2     | Distributed task queue              |
| cffi                | 2.1.0     | C language interface calls          |
| colorama            | 0.4.6     | Terminal colored output             |
| crc32c              | 2.8       | CRC32c checksum algorithm           |
| cryptography        | 3.3       | Cryptography toolkit (Fernet, X.509, etc.) |
| dnspython           | 2.7.0     | DNS resolution library              |
| evdev               | 1.9.2     | Linux input device event handling   |
| frida               | 17.15.2   | Dynamic instrumentation tool (injection/debugging) |
| frida-tools         | 14.10.4   | Frida command-line tool suite       |
| gevent              | 21.1.2    | Coroutine-based network library     |
| greenlet            | 3.5.3     | Low-level coroutine support         |
| grpc-interceptor    | 0.15.2    | gRPC interceptor extension          |
| grpcio              | 1.72.2    | gRPC framework core                 |
| grpcio-tools        | 1.72.2    | gRPC protobuf code generation tool  |
| iniconfig           | 2.3.0     | INI config file parsing             |
| jmespath            | 1.1.0     | JSON query language (JMESPath)      |
| lxml                | 6.1.0     | High-performance XML/HTML parsing   |
| mmkv                | 1.3.14    | Tencent open-source key-value store (MMKV) |
| msgpack             | 1.2.1     | MessagePack binary serialization    |
| numpy               | 2.5.0     | Numerical computing and multi-dimensional arrays |
| opencv-python       | 4.11.0    | Computer vision (OpenCV)            |
| paho-mqtt           | 2.1.0     | MQTT protocol client                |
| paramiko           | 5.0.0     | SSHv2 protocol client               |
| peewee              | 4.2.0     | Lightweight ORM                     |
| pem                 | 23.1.0    | PEM format certificate parsing      |
| pika                | 1.4.1     | RabbitMQ client                     |
| pilk                | 0.2.4     | WeChat voice codec                  |
| protobuf            | 4.25.8    | Protocol Buffers serialization      |
| psycopg             | 3.3.4     | PostgreSQL database driver (async support) |
| psycopg-pool        | 3.3.1     | psycopg connection pool             |
| pyaxmlparser        | 0.3.31    | Android XML (AXML) parser           |
| pycparser           | 3.0       | C language parser                   |
| pycryptodome        | 3.9.9     | Cryptographic algorithm library (Crypto replacement) |
| pyelftools          | 0.33      | ELF file parsing                    |
| pyinotify           | 0.9.6     | Linux inotify file event monitoring |
| pyOpenSSL           | 23.1.0    | Python wrapper for OpenSSL          |
| pyotp               | 2.9.0     | One-time passwords (TOTP/HOTP)      |
| python-dateutil     | 2.8.2     | Date and time extensions (relative times, etc.) |
| pytz                | 2026.2    | Timezone handling (Olson database)  |
| pyzbar              | 0.1.9     | QR code / barcode decoding          |
| qrcode              | 8.1       | QR code generation                  |
| redis               | 5.2.1     | Redis database client               |
| requests            | 2.34.2    | HTTP client (simple API)            |
| scapy               | 2.5.0     | Network packet construction and sniffing |
| sqlalchemy          | 2.0.50    | ORM                                 |
| tflite-runtime      | 2.15.0    | TensorFlow Lite inference runtime   |
| tornado             | 6.5.6     | Async web framework and networking library |
| ujson               | 4.0.0     | High-performance JSON encoding/decoding |
| urllib3             | 2.7.0     | HTTP client (low-level, requests dependency) |
| uvloop              | 0.21.0    | asyncio event loop acceleration (libuv) |
| websocket-client    | 1.9.0     | WebSocket client (synchronous)      |
| websockets          | 13.1      | WebSocket client/server (asynchronous) |
| xmltodict           | 0.12.0    | XML to Python dict conversion       |
| zstandard           | 0.25.0    | Zstandard compression algorithm     |

You can use the `pip` command to install third-party libraries implemented in pure Python, but you cannot install compiled libraries or those with .so files. For a full experience, we recommend using the [Virtual Debian Environment](./virtual-debian.md).