A guide for beginners
You may have already found a-Shell
on the App Store. a-Shell
is a terminal emulator for iOS/iPadOS, which allows you to run various Unix commands, from importing the python.rich
module to managing vim
plugins. You can use ffmpeg
, python
, lua
, tex
, perl
, clang
, wasm
, jsc
, etc, and edit text using vim
or nano-like pico
. You can even run JupyterLab
; also, code-server
may be researched in the future.
What you can do
Basic commands and net commands
As is expected, basic commands like ls
, cd
and cp
are available of course. Many important net commands have been provided as well.
man
command is also provided, so you can read the manuals of basic commands easily.
Get more packages
A tool called pkg
can be used to install some extra commands. You can use pkg install
to get more commands:
Use pkg list
to list all packages already-installed and pkg search <package name>
to search if a package is available. To see all available packages, use pkg search
. To remove a package, use pkg remove <package name>
.
The variable $PKG_SERVER
defines the address to get packages. If the variable is not set, the default repository https://github.c
om/holzschu/a-Shell-commands would be used. You can set the repository you use by setting the variable:
If you can’t get or search for any package, there may be something wrong with $PKG_SERVER
. Try to unset it to switch to the default repository:
Edit text files
So far three text editors are provided: vim
, pico
and ed
.
Vim users may be happy to see Vim plugins just work, but plugin managers like vim-plug
have many problems. Therefore, it’s suggested to use Vim 8’s built-in package manager. See https://github.com/HeavySnowJakarta/A-guide-to-a-Shell/blob/main/basic-tutorials/basic-tutorials/configure-your-vim.md for details.
If you are not used to Vim and looking for a simpler text editor, pico
will suit your needs. GNU Nano under GPL can’t be included in a-Shell due to FSF’s policy, so pico
is included to provide a similar experience.
A toy, ed
, is also included. ed
is a line editor, which allows one to input editing commands line by line. For the example below, r
, ,p
, 1
, 2
, 3
, 4
and q
are commands inside, and others are the outputs by ed
.
There are also Web based editors available: Ace, CodeMirror and Monaco. Use pkg
to get them installed.
Running codes
See Running codes for tips on running Python, Lua and Perl with a-Shell.
Remote SSH/SFTP
SSH connecting is available. Just use ssh
, scp
and sftp
as you’ve got used to. Use ssh-keygen
to generate SSH keys. mosh
and sshd
are not supported yet.
C/C++ and WebAssembly
Thanks to WebAssembly, it’s not impossible to compile projects written in C/C++. With clang
, we can compile C codes into WebAssembly, and with wasm
, we can run them easily. In fact, almost all commands installed by pkg
are distributed in WebAssembly.
Last updated
Was this helpful?