DEVELOPER SANDBOX Academy of Mastery
Get help and info

Hover any card or icon to learn more.

Return to sdelgado
REFERENCE GUIDE

Terminal Commands

Common shell commands for navigating directories, managing files, inspecting processes, and working in development environments.

02

Files & Directories

Create, copy, move, rename, and remove files and directories.

mkdir project
Create a directory

Creates a new folder named project.

touch index.html
Create a file

Creates an empty file, or updates its timestamp if it already exists.

cp file.txt copy.txt
Copy a file

Creates a copy of a file at the specified destination.

mv old.txt new.txt
Move or rename

Moves a file or directory. Changing the destination name renames it.

rm file.txt
Remove a file

Deletes the specified file.

rm -r folder
Remove a directory

Recursively removes a directory and everything inside it.

03

Viewing & Searching

Inspect file contents and search for text, files, and directories.

cat file.txt
Display file contents

Prints the contents of a file directly in the terminal.

less file.txt
Read long files

Opens file contents in a scrollable terminal viewer.

grep "text" file.txt
Search inside a file

Finds lines containing the specified text.

find . -name "*.js"
Find files

Searches the current directory and its descendants for JavaScript files.

04

Processes

Inspect running programs and terminate processes when necessary.

ps
Show processes

Displays processes associated with the current terminal.

ps aux
Detailed process list

Displays running processes with additional information.

kill PID
Stop a process

Sends a termination signal to the process matching the supplied process ID.

Ctrl + C
Stop the current command

Interrupts a command or development server running in the current terminal.

05

Permissions

Inspect and modify file permissions when working with scripts and development tools.

chmod +x script.sh
Make a script executable

Adds execute permission to the specified shell script.

sudo command
Run with elevated privileges

Executes a command with administrative permissions when required.

06

Common Utilities

Frequently used commands for development and terminal workflows.

clear
Clear the terminal

Clears previous terminal output from the current view.

history
View command history

Displays commands previously entered in the shell.

which node
Locate an executable

Displays the executable path used for a command.

man command
Open command documentation

Opens the manual page for commands that provide system documentation.