pwd

Show the current directory, the saved ~ base and the \ installation root; the current directory can become the new ~ base.

FilesVersion 1.1.3Stable
lil-terminal

Overview

Use pwd to keep two stable reference points while you work: ~ follows the directory selected with pwd -s, while \ always points to the directory containing lil.php. Paths such as ~tmp and \tmp stay short even when the current directory changes, so file operations and .lil workflows can reuse the same destinations without rebuilding long absolute paths.

Know which directory and root you are using

Keep three locations distinct: the current directory, the saved ~ base and the fixed \ installation root.

Syntax

lil-terminal
pwd [~|\|-b|-s]

Reference

pwd

show the current directory

pwd ~

show the selected directory used by ~ paths

pwd -b | pwd \

show the directory containing lil.php, used by \ paths

pwd -s | pwd set

set the current directory as the ~ base

Notes

pwd set changes only the selected ~ base. The \ root always remains the directory containing lil.php. Path forms such as ~tmp and \tmp therefore resolve from two different stable locations.

Interactive sandbox preview

Run the prepared examples directly on the page. Their results are prebuilt and shown in the browser; no terminal command is executed on the server.

Show the current directory

Install and manage

Install the current compatible version. Choose Base for the complete feature set or Minimum for the reduced package; use upgrade to update a module that is already installed.

Base and Minimum are two packages of the same current module release, not separate command versions.

Base package

Install the complete package with local command reference and every published mode.

install pwd
Minimum package

Install the reduced package. Local reference is omitted; help <cmd> -i opens the current server reference.

install pwd -m
Exact public version

Install exactly this published version.

install pwd -v 1.1.3
Check or update

Ask upgrade to check compatibility and replace the installed block only when needed.

upgrade pwd
Remove module

Remove the extension block while leaving the core and unrelated modules intact.

install pwd -u

Examples

Examples are copyable command lines, not actions executed by this website. Review paths, permissions and destructive flags before running them on a real project.

Show the current directory
pwd | cd \sandbox | pwd | pwd -s | pwd ~
/home/account/public_html

/home/account/public_html/sandbox

/home/account/public_html/sandbox

/home/account/public_html/sandbox
Show the selected directory used by ~ paths
pwd ~
sandbox/workspace

~ points to the working base saved with pwd -s, so paths such as ~tmp stay short even when the real directory is deeper.

Show the directory containing lil.php, used by \ paths
pwd -b
sandbox

pwd -b and pwd \ refer to the directory that contains lil.php; this root is independent from the working base selected with pwd -s.

Set the current directory as the ~ base
pwd -s
base  sandbox

After pwd -s, ~ resolves to the current directory until you choose another working base.

Pwd · -x
pwd -x
?

Related documentation

Current public release

v1.1.32026-08-13

Separate selected and installation roots

Separates the user-selected ~ base from the fixed \ root containing lil.php and adds explicit inspection forms for both.