# Terminal Guide The terminal is the command shell and script runner for each computer. ## Script execution model - Run scripts in foreground with `run`. - Run scripts in background with `runbg`. - Foreground and background execution are subject to server time and parallel limits. - Startup script `/etc/startup.lua` is executed on boot when present. ## Keyboard suggestions - If the first command token is non-empty and you pause typing for about 3 seconds, the terminal shows command suggestions. - Suggestions include built-in shell commands and runnable scripts from `/bin`. - Press `Tab` once to autocomplete to the best match. - Press `Tab` again to cycle forward through suggestions (bash-style). - `Up` / `Down` always navigate command history regardless of suggestion state. - Typing any character dismisses the current suggestion list. ## Key commands - `help [command]`: list commands or show usage/details for one command (for example `help rm`). - `which [-a] `: resolve commands and script paths (`-a` shows all matches). - `ls [-a] [-l] [-R] [path]`, `cd `, `pwd [-L|-P]`, `mkdir [-p] ...`, `cat [-n] [-A] ...`, `touch `. - `rm [-r] [-f] ...`, `cp [-r] `, `mv `, `writefile `. - `find [path] [-name ] [-type f|d] [-maxdepth ]` for recursive search. - `grep [-n] [-i] [-r] ` for content search. - `history` to list indexed commands and `!` to re-run a history entry. - `stat ...` for file/directory metadata. - `tree [-a] [-L depth] [path]` for directory visualization. - `head [-n lines] `, `tail [-n lines] `, `wc [-l] [-w] [-c] ...` for file inspection. - `echo [-n] ` for output (`-n` suppresses trailing newline). - `protect [ops]` to protect paths by operation scope. - `unprotect ` to remove path protection. - `fsauth ` and `fsauth --clear` to manage filesystem auth session. - `perms [path]` to inspect configured protection rules. - `run