Prerequisites
Make sure you have installed Nash before proceeding.Start the Interactive REPL
Explore your environment
Check where you are and what’s available:Everything you see exists only in memory — your real home directory is untouched.
Working with Files and Directories
Create a project directory
Let’s create a workspace:The
-p flag creates parent directories automatically, just like regular mkdir.Using Pipes and Text Processing
Command Chaining and Logic
Chain commands with && and ||
Execute commands conditionally:
&&runs the second command only if the first succeeds||runs the second command only if the first fails
Working with Host Directories
Exit Nash and create a test directory
Press
Ctrl-D to exit Nash, then create a directory on your real filesystem:Mount the directory in Nash
Start Nash with a bind mount:
The
--bind flag (or -B) mounts a host directory into the VFS at the specified path.Running Shell Scripts
Execute the script
Run the script with Nash:Output:
All files created by the script exist only in Nash’s VFS. Your real filesystem is not affected unless you use
--bind.Advanced Features
Process JSON Data
Nash includes a built-injq implementation:
Use Shell Variables
Set Shell Options
Run scripts with debugging:Run Multiple Users
Create different user environments:Tips and Tricks
What’s Next?
You now know the basics of Nash! Here are some next steps:CLI Reference
Learn about all available command-line flags and options
Built-in Commands
Explore the full list of 28 built-in commands
Shell Syntax
Deep dive into pipes, redirections, and advanced syntax
Security Model
Understand how Nash provides sandboxing guarantees
Getting Help
- Type
helpin the Nash REPL for command reference - Use
which <command>to check if a command is available - Press
Ctrl-Dor typeexitto quit Nash - Visit the GitHub repository for issues and discussions
